Thursday, 30 January 2025

Code Solutions

# This program determines whether or not someone is eligible to run for president
# in the U.S.

age = int(input("Age: "))
citizen = input("Born in the U.S.? (Yes/No): ")
years_resident = int(input("Years of Residency: "))


if age >= 35 and citizen == "Yes" and years_resident >= 14:
    print ("You are eligible to run for president!")
else:
    print ("You are not eligible to run for president.")

3 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Thanks for sharing these code solutions! They're well-organized and easy to follow—great for learners who need quick, reliable references. It's always helpful to see clean and simple examples like these. Keep up the great work!

    Epicforce Tech

    ReplyDelete
  3. I like your technical knowledgeable blogs love and thanks for live share informatic information.

    Best Fine art Institute in Delhi
    Best Computer Institute in Delhi

    ReplyDelete