Question
PYTHON Write a program that determines if the user can legally vote. Voters must be USA citizens and at least 18 years of age. Your
PYTHON Write a program that determines if the user can legally vote. Voters must be USA citizens and at least 18 years of age. Your program should verify both of these requirements before making a positive determination. See possible Sample Outputs. Note that the citizen question should not be asked if the user fails to meet the age requirement. Sample Output 1 Enter your age 17 Sorry, you must be 18 to vote Sample Output 2 Enter your age 18 Are you a US citizen? y/n n You are old enough but only citizens can vote Sample Output 3 Enter your age 22 Are you a US citizen? y/n y You can legally vote
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started