Skip to content

Instantly share code, notes, and snippets.

@flakpaket
Last active November 17, 2017 04:01
Show Gist options
  • Save flakpaket/2b4a8933c7829f9b502d612adb9baf4d to your computer and use it in GitHub Desktop.
Save flakpaket/2b4a8933c7829f9b502d612adb9baf4d to your computer and use it in GitHub Desktop.
#!/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