We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent de7c8e2 commit ee1ee06Copy full SHA for ee1ee06
CodeHS/4/4/6/Presidential Eligibility- Extended.py
@@ -0,0 +1,19 @@
1
+"""
2
+This program made by Joe
3
4
+userage = bool(int(input("Age: ")) >= 35)
5
+user_birthplace = bool(input("Born in the US? (Yes/No): ") == "Yes")
6
+user_residency = bool(int(input("Years of Residency: ")) >= 14)
7
+
8
+if (userage and user_birthplace) and user_residency:
9
+ print("You are eligible to run for president.")
10
+else:
11
+ print("You are not eligible to run for president.")
12
13
+if userage != True:
14
+ print("You are too young. You must be at least 35 years old.")
15
+if user_birthplace != True:
16
+ print("You must be born in the U.S. to run for president.")
17
+print(user_residency)
18
+if user_residency != True:
19
+ print("You have not been a resident for long enough.")
0 commit comments