Last active
November 17, 2017 04:01
-
-
Save flakpaket/2b4a8933c7829f9b502d612adb9baf4d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| ''' | |
| Demo app to teach my daughter how we can make cool tools and apps with python. | |
| She's working on speeding up her times tables at school, so this creates | |
| a set of multiplication problems for her to solve. | |
| ''' | |
| import random, sys | |
| def makeProblems(num): | |
| x = 0 | |
| while x < num: | |
| y = random.randint(0,9) | |
| z = random.randint(0,9) | |
| print str(y) + " x " + str(z) + " = ____" | |
| x+=1 | |
| makeProblems(sys.argv[1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment