Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

python programming: q1. [18]: #complete this get_vehicle_input() function to prepare for the main menu application #this function is used to ask for vehicle information and

python programming:

q1.

image text in transcribed
[18]: #complete this get_vehicle_input() function to prepare for the main menu application #this function is used to ask for vehicle information and then return them: make, model, year, mileage #this function doesn't take arguement(s) #no need to handle exceptions of make input and model input #handle exceptions to make sure year is a 4-digit positive number between 1900 and 2020 #handle exceptions to make sure mileage is a positive number def get_vehicle_input () : veh_make = input('Enter the vehicle make: ') veh_model = input('Enter the vehicle model: ') #type in your cide return (veh_make, veh_model, veh_year, veh_mileage) [19]: #do a quick test on the get_vehicle_input() function before moving forward (5 points) #don't change this code and please use the example input #example input: Ford; Ranger; 2021 (when asked to enter again enter 2011); 80060 vehiclemake, vehiclemodel, vehicleyear, vehiclemileage = get_vehicle_input() print("The vehicle entered is a {0} {1} made in {2} with {3} mileage curently. ". format (vehiclemake, vehiclemodel, vehicleyear, vehiclemi Enter the vehicle make: Ford Enter the vehicle model: Ranger Enter the year of manufacture (yyyy): 2021 Please enter an integer value for year in the format of yyyy between 1900 and 2020. Enter the year of manufacture (yyyy ) : 2011 Enter the mileage: 80000 The vehicle entered is a Ford Ranger made in 2011 with 80000 mileage curently

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

Students also viewed these Programming questions