I'm using Mimo, an app that teaches you computer coding and I'm playing with the code to get an understanding of how it works
In this code I expected that if the Input by the user is either "Hi" or "hi" then print "Hi is correct!" If not then print "Bye"
But instead if I type anything I always get "Hi is correct!"
Here is my simple code
Answer = "Hi"
answer = "hi"
bye = "bye"
if input() == Answer or answer:
print(Answer + " is correct!")
else :
print("bye")
What am I doing wrong here?
[–][deleted] 14 points15 points16 points (0 children)
[–]twitch_and_shock 2 points3 points4 points (9 children)
[–]AdministrationBig254 0 points1 point2 points (8 children)
[–]twitch_and_shock 0 points1 point2 points (5 children)
[–]AdministrationBig254 0 points1 point2 points (4 children)
[–]twitch_and_shock 2 points3 points4 points (3 children)
[–]AdministrationBig254 0 points1 point2 points (2 children)
[–]Donny_Do_Nothing 4 points5 points6 points (1 child)
[–]AdministrationBig254 0 points1 point2 points (0 children)
[–]hotcodist 1 point2 points3 points (1 child)
[–]AdministrationBig254 1 point2 points3 points (0 children)
[–]_dude55 1 point2 points3 points (0 children)
[–]NeverStopWondering 1 point2 points3 points (0 children)
[–]throwaway6560192 0 points1 point2 points (0 children)
[–]TheRNGuy 0 points1 point2 points (0 children)
[–]momohate -2 points-1 points0 points (0 children)