Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions frog-2.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import random
import sys

def frog(final_dist=100,max=6):

# I wrote this quickly in a pub
# Don't judge me

total_dist = 1

while total_dist <= final_dist:

import random

cap = 10**max

trials = 0
Expand All @@ -33,6 +34,14 @@ def frog(final_dist=100,max=6):
total_dist += 1

return "DONE"




def main(args):
"""
Read the first command line as 'final_dist'
Read the second command line as 'max'
"""
frog(*[int(a) for a in args[1:3]])

if __name__ == '__main__':
main(sys.argv)