1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
tatyana61 [14]
3 years ago
5

Develop a Python application that incorporates using appropriate data types and provides program output in a logical manner. You

r 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.
Computers and Technology
1 answer:
Rasek [7]3 years ago
4 0

Answer:

#program in Python.

# create a dictionary

car_dic = dict()

# read brand of car

car_dic['brand'] = input("Enter brand : ")

#read model of cal

car_dic['model'] = input("Enter model : ")

#read manufactured year

car_dic['year'] = int(input("Enter manufactured year : "))

#starting odometer

car_dic['start_odometer'] = int(input("Enter the starting odometer reading: "))

#ending odometer

car_dic['end_odometer'] = int(input("Enter the ending odometer reading: "))

#mileage of the car

car_dic['mileage'] = float(input("Enter miles per gallon consumed by the vehicle: "))

#Details of the car

print("Details of the car: ")

for i in car_dic:

   print(i, ": ",car_dic[i])

Explanation:

Create a dictionary "car_dic" to store the Details of the car.Then ask user to enter the details of car such as brand, model, year, start_odometer, end_odometer and mileage.Then print all the details of the car.

Output:

Enter brand : Audi

Enter model : A6

Enter manufactured year : 2019

Enter the starting odometer reading: 100

Enter the ending odometer reading: 200

Enter miles per gallon consumed by the vehicle: 12

Details of the car:

mileage :  12.0

end_odometer :  200

year :  2019

model :  A6

start_odometer :  100

brand :  Audi

You might be interested in
I will mark Brainliest if you sub to Huggablesheep 89 he said he is going to quit if he gets 50 subs he might try again please h
Rashid [163]
I’ll go sub! for you!!
4 0
3 years ago
Read 2 more answers
Each time the enter key is pressed, word creates a new paragraph. (points : 2) true false
ludmilkaskok [199]
Your answer would be true
6 0
3 years ago
Unscramble the risks of sharing files on the Intern
Zinaida [17]

Answer:

Broken Firewall, Piracy, Malware, Virus, adware

Explanation:

Please give brainliest if this helps

4 0
3 years ago
What is computer science
solong [7]

Answer:

computer science is the study of the principles and use of computers.

Explanation:

8 0
3 years ago
Read 2 more answers
In a newspaper advertisement for a hybrid car, which of these presentation methods would be most effective
faltersainse [42]
Your answer is a....
6 0
3 years ago
Read 2 more answers
Other questions:
  • What did the use of steam engines in printing presses lead to the development of?
    14·1 answer
  • What does a counterweight do for a mine winding system
    13·1 answer
  • What is likely to happen to the economy when there’s too much money or credit circulating?
    13·1 answer
  • When designing a website, describe 3 best practices you would give to your fellow classmate on effective web design that will ma
    9·1 answer
  • 3. The combination of keys that we should press to select all document is
    14·1 answer
  • Your supervisor has asked you to set up a RAID hard drive array in a tower system, which has a motherboard that uses the B360 ch
    10·1 answer
  • In C++ :
    6·1 answer
  • ? I don’t understand
    8·2 answers
  • Which of the following programming languag
    13·1 answer
  • The sequence of instructions performed to execute one program instruction
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!