233k views
2 votes
Can someone fix this so that it only says "its a payday" on 15 and 30 and on all other days "sorry, it's not payday"

tod=int(input("Enter today's day numerically:"))
if (tod != 30 or tod != 15):
print("Sorry, not a payday.")
if (tod == 30 or tod == 15):
print ("It's payday!")

User Monday
by
4.6k points

1 Answer

4 votes

Answer:

day = int(input("Enter today's day numerically: "))

if (day == 15 or day== 30):

print ("It's payday!")

if (day != 15 and day != 30):

print ("Sorry, not a payday.")

Step-by-step explanation:

I just did it and 100%

User Tom Peplow
by
4.7k points