Tables Challenge 1

Tables Challenge 1
Create a new Python document (File, New, New File.., Python Script, Create)
Save your work as tt1.py
Import Random into the top of your document

import random

#We need random to make our random choices work later

Create two variables to randomly choose numbers between 2 & 12

num1=random.randint(2,12)
num2=random.randint(2,12)

#int stands for integer (whole number)
#random whole number between 2 & 12

Test these random numbers by printing them

print(num1,num2)

Save your work and run the program lots of times
If you get two random numbers printing on screen congratulations your code works.
Finally
delete the print(num1,num2)  command as we only needed to use this to test
if our random numbers were working.

Comments