Dec-01-2016, 11:18 PM
The input function returns a string, so the response variable is a string value. You then compare it to the integer value of correct. They will never be equal. You want to convert the string to an integer with int:
response = int(input('response? '))Note you can do:
print('What is', number, 'X', table)to print it all on one line. You might also want to look into the format method of strings.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures