+ 1
Probably easy fix for most.?
answer = input("running or walking") if input is 'running': answer = True else: answer = False print('Do you like to jog? ', answer) """ Keeps giving "False" as answer when returning input as running. Trying to get it to read "True" when input is "running" but False for every other answer. Thank you for your help """
3 Answers
+ 8
This is what you want:
answer = input("running or walking")
if answer == 'running':
answer = True
else:
answer = False
print('Do you like to jog? ', answer)
You were not checking your inputted answer.
+ 1
There it is! thank you. I knew it was something simple and when I did it I did it on answer == True. Thank you. I feel much better knowing I wasn't so far off.
+ 1
I also didn't know the ' ' vs " " made such a difference either.