Lesson 6: Multiplications

Post date: Nov 8, 2017 3:56:28 PM

print("This is the multiplication table:")

for x in range(0,11):

for y in range(0,11):

product = x * y

print(x,"x",y,"=",product)

import random

goodanswer = 0

for x in range(0,10):

a = random.randint(0,10)

b = random.randint(0,10)

print("What is", a,"x",b,"= ?")

answer = input()

if a * b == int(answer):

print("Correct")

goodanswer += 1

else:

print("You missed it")

print("Your result is ",goodanswer,"/10")