Answer to Question #273007 in Python for Karabo

Question #273007

Write a program that determines whether you can run for president. To run for president

the constitution states: No Person except a natural born Citizen, or a Citizen of the South

Africa(SA), at the time of the Adoption of this Constitution, shall be eligible to the Office

of President; neither shall any Person be eligible to that Office who shall not have

attained to the Age of thirty five Years, and been fourteen Years a Resident within the

South Africa. Ask three questions of the user and use the guess and check pattern to

determine if they are eligible to run for President.


1
Expert's answer
2021-11-29T00:00:06-0500
age = int(input("How old are you? "))
country = input("Where do you live? ")

if age >= 30 and country == "south africa":
    print("YES")
else:
    print("NO")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS