Dec-02-2016, 09:55 PM
Thanks folks. I can see why it wouldn't like that. I hadn't realised it treated every input as a string but now it makes sense. I've also taken the advice on how to combine the other bits and it's looking much tidier now.
Many thanks for the help.
print('Let us practice our seven times tables') table = 7 from random import randint number = randint(2, 12) correct = number * table response = input('What\'s ' + str(number) + ' X ' + str(table) + ' = ') if int(response) == correct: print('Well done. You\'re spot on.') else: print('Actually it is') print(correct)Next step will be to get to grips with how to make it repeat and possibly add a scoring element and the ability to change the times table you're practicing.
Many thanks for the help.