🔒 Closed Python help

Status
Not open for further replies.
a python program IDLE that asks the user how old they are tell them if they are old enough to vote. Then extend the program tell them how many years it is until they can retire (assume at age 65).

Pa help po using PYTHON IDLE
 
def validate(x):
s = ""
if age >= 18:
til = 65 -age
s = "allowed to vote til " +str(til)
else:
s = "under age"
return s

#main
age = int(input("Enter your age: "))
print(validate(age))


#guide mo na lang sir.
 
Status
Not open for further replies.

About this Thread

  • 1
    Replies
  • 762
    Views
  • 2
    Participants
Last reply from:
angelofmercy

Trending Topics

Online now

Members online
1,025
Guests online
1,088
Total visitors
2,113

Forum statistics

Threads
2,272,804
Posts
28,945,386
Members
1,236,416
Latest member
Jananoni2030
Back
Top