Python “if” statement not working

后端 未结 1 922
隐瞒了意图╮
隐瞒了意图╮ 2021-01-29 12:12

I was writing a complex program and I was getting an if statement... (this isn\'t the complex code, this is just an example)

print(\"The 24 game will give you fo         


        
1条回答
  •  悲哀的现实
    2021-01-29 12:23

    It would work after converting the user input string to a number:

    if int(f) == a:
        print("ok")
    

    0 讨论(0)
提交回复
热议问题