migrate to git.charlotte.sh
This commit is contained in:
commit
fbd588721e
412 changed files with 13750 additions and 0 deletions
14
python-csi160/week04/week04_labs/croce_week04_lab_01.py
Normal file
14
python-csi160/week04/week04_labs/croce_week04_lab_01.py
Normal file
|
@ -0,0 +1,14 @@
|
|||
|
||||
#1. Implement a voting test. The user enters their age and then the program prints either,
|
||||
# “You must be 18 to vote” or “You are of voting age”.
|
||||
|
||||
def voting_test():
|
||||
age = int(input("age: "))
|
||||
if age >= 18:
|
||||
print("You are of voting age")
|
||||
else:
|
||||
print("You must be 18 to vote")
|
||||
|
||||
|
||||
voting_test()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue