![]() |
If statement won't print - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: If statement won't print (/thread-18373.html) |
If statement won't print - coreywratchford66 - May-14-2019 When I run this code there is no error but it isn't printing match like I want it to. Any idea as to why? The code is as follows. while True: numbers = 534535345 barcode = int(input("Barcode: ")) if numbers == barcode: print("match")#The output prints "Barcode: " like it should, but once I input numbers matching the "numbers" variable I press enter and the #string "match" isn't printed. Also the while loop should repeat but it isn"t.
RE: If statement won't print - ichabod801 - May-15-2019 Works fine for me. Is this your whole code? How exactly are you running it? |