Answered step by step
Verified Expert Solution
Link Copied!

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!image text in transcribed

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 old

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

LO5 Highlight five external recruiting sources.

Answered: 1 week ago