Steazr
New Coder
I'm trying to make a function that lets you choose a number between 1 and 2, and use the last number if anything else is used. I do this, but everytime the if statement is failing me, and instead just runs the code inside of the if statement even if the conditions aren't met. Here is the code
if you can help me solve this, I would be incredibly thankful.
Python:
import Vars
def choose():
Prompt1 = input("Type a num
else:
print("Invalid number, using last number...")
Prompt2 = input("Type a number 1-2. This is your SECOND number choice.\n")
Choice2 = int(Prompt2)
if Choice2 > 2 or Choice2 <= 0:
Vars.No2 = Choice2
else:
print("invalid number, using last number...")
print(Vars.No1, Vars.No2)