Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

What is the code to a Python program that will: 1) Get the driver's age as input. 2) Get the number of DUI tickets the

What is the code to a Python program that will:

1) Get the driver's age as input.
2) Get the number of DUI tickets the driver has as input.
3) Get the number of speeding tickets the driver has as input.

if the driver has an age greater than 85 print the following "Please return your license to DMV."
The below conditions can be checked only if the driver's age is less than 85.
if the total number of speeding tickets and DUI is more than or equal 5 print "Your license is revoked."
if the total number of speeding tickets and DUIs is less than 5 and more than 3 print "You being watched. Drive responsibly."
if the total number of speeding tickets and DUI is less than 3 and more than 1 print "Please drive carefully".
if the total number of speeding tickets and DUI is 0 print "Thanks for keeping our roads safe."

Step by Step Solution

3.51 Rating (154 Votes )

There are 3 Steps involved in it

Step: 1

You can create a Python program to achieve this as follows Get drivers age as input ... 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

Introduction to Java Programming, Comprehensive Version

Authors: Y. Daniel Liang

10th Edition

133761312, 978-0133761313

More Books

Students also viewed these Programming questions

Question

What is the biggest challenge facing the organization?

Answered: 1 week ago