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.

Revisions

  1. flakpaket revised this gist Nov 17, 2017. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions multiplication.py
    Original file line number Diff line number Diff line change
    @@ -4,11 +4,12 @@
    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
    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
    x+=1
    makeProblems(sys.argv[1])
  2. flakpaket revised this gist Nov 17, 2017. 1 changed file with 6 additions and 0 deletions.
    6 changes: 6 additions & 0 deletions multiplication.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,9 @@
    #!/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
    def makeProblems(num):
    x = 0
  3. flakpaket revised this gist Nov 17, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions multiplication.py
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    import random
    def makeProblems(num):
    x = 0
    while x < num:
  4. flakpaket created this gist Nov 17, 2017.
    7 changes: 7 additions & 0 deletions multiplication.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    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