Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please show an example of this code in Python, including output. Thank you! 2. Write a script asking the user for their age. Use the
Please show an example of this code in Python, including output. Thank you!
2. Write a script asking the user for their age. Use the age and a while loop to determine if the user can vote. If the user is less than 18 years old, use the while loop to display the user's age and increment the age until they reach 18 years of age. The output should look something similar to this: Enter your age: 10 You cannot vote! You are only 10 years old. You cannot vote! You are only 11 years old. You cannot vote! You are only 12 years old. You cannot vote! You are only 13 years old. You cannot vote! You are only 14 years old. You cannot vote! You are only 15 years old. You cannot vote! You are only 16 years old. You cannot vote! You are only 17 years oldStep 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