Question: Please answer this question as if you have NO coding experience. Develop a Python application that incorporates using appropriate data types and provides program output
Please answer this question as if you have NO coding experience.
Develop a Python application that incorporates using appropriate data types and provides program output in a logical manner. Your program should prompt a user to enter a car brand, model, year, starting odometer reading, an ending odometer reading, and the estimated miles per gallon consumed by the vehicle. Store your data in a dictionary and print out the contents of the dictionary.
I'm this far but cannot get it to execute. Please respond with fixes to currently written code that will execute in an IDLE.
car = { 'brand': 'Enter brand of the car: ', 'model': 'Enter model of the car: ', 'year': 'Enter the year the car was made: ', 'start_odom' : 'Enter the starting odometer reading: ', 'end_odom': 'Enter the ending odomoter reading: ', 'mileage': 'Enter miles per gallon consumed by the vehicle: '}
print("Car details: ") car['brand'] = input("Enter brand of the car: ") car['model'] = input("Enter model of the car: ") car['year'] = int(input("Enter the year the car was made: ")) car['start_odom'] = int(input("Enter the starting odometer reading: ")) car['end_odom'] = int(input("Enter the ending odometer reading: ")) car['mileage'] = float(input("Enter miles per gallon consumed by the vehicle: ")) print(car)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
