I am trying to create a function that accepts 5, 10, and 25 as input, re-prompting the user if one of those numbers is not inputted.
def get_paid(y):
while True:
n = int(input("Insert Coin: "))
if n != 5 or 10 or 25:
print(f"Amount Due: {y}")
continue
else:
break
return n
However, no matter what input is given it is stuck in the loop and doesn't break. If I only set it to 5, it works.
def get_paid(y):
while True:
n = int(input("Insert Coin: "))
if n != 5:
print(f"Amount Due: {y}")
continue
else:
break
return n
How can I set it so if n is 5, 10, or 25 it will break?