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
How is peace circulated?​
Agata [3.3K]

Answer:

Peace is when people are able to resolve their conflicts without violence and can work together to improve the quality of their lives. 

6 0
3 years ago
Read 2 more answers
Need to know? Anyone feel like helping me not fail
8_murik_8 [283]
I’m not sure but i think it might be design
4 0
3 years ago
What is the best image format for our website if we needed our image to have a transparent background?
Rainbow [258]
PNG- Usually if you look up your picture and then add png to the end, it has a transparent background. Make sure it has free usage, though.
5 0
3 years ago
A computer has many resources. A resource can be memory, disk drive, network bandwidth, battery power, or a monitor. It can also
bekas [8.4K]

Answer:

The security principle being referred to here is:

Resource Encapsulation.

Explanation:

Resource Encapsulation is one of the cybersecurity first principles.  It allows access or manipulation of the class data as intended by the designer. The cybersecurity first principles are the basic or foundational propositions that define the qualities of a system that can contribute to cybersecurity.  Other cybersecurity first principles, which are applied during system design, include domain separation, process isolation, modularization, abstraction, least principle, layering, data hiding, simplicity, and minimization.

7 0
3 years ago
Answer all of the questions correctly and you will be amazing. Fill in Blanks
Naya [18.7K]
A.Chicken Street
B.You just got Vectored
5 0
4 years ago
Other questions:
  • What is a valence orbit?
    13·2 answers
  • While a hard drive is running, even a slight bump against the computer may cause the
    9·2 answers
  • Elizabeth works for a local restaurant at the end of her shift she read she’s required to write in the time that she arrived in
    9·1 answer
  • Define a romanNumberToInt function that converts a RomanNumber value, which is a list of Roman digits, into an integer. Hints: -
    7·1 answer
  • Which command button contains the following sub options as given in the picture?
    6·2 answers
  • Careers on the largest declining industries list will see an increase in the number of employees in their workforce.
    15·1 answer
  • How to interchange first half of the array with second half of array in python?
    9·1 answer
  • The first row in a table is referred to as the _____ row and the last row is considered the _____ row.
    9·1 answer
  • Well the last week has been kind of terrible...
    9·2 answers
  • Using the simple alphabet code below, you will decode and encode the message. Write the Full
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!