print('Welcome to multiplication game!')
print('(Empty to quit)')
import random

s = 'start'
while not s == '':
    a = random.randint(0, 9)
    b = random.randint(0, 9)
    s = input(f'{a}*{b}=')
    if not s=='':
        try:
            p = int(s)
            if p == a*b:
                print('Good job!')
            else:
                print('Oh, no, try again.')
        except:
            print("I don't understand that.")