subject

Write a class named car that has the following data attributes: __year_model (the car’s year model) __make (the make of the car) __speed (the car’s current speed) the car class should have an __init__ method that accept the car’s year model and make as arguments. these values should be assigned to the object’s __year_model and __make data attributes. it should also assign 0 to the __speed data attribute. the class should also have the following methods: accelerate - the accelerate method should add 5 to the speed data attribute each time it is called. brake - the brake method should subtract 5 from the speed data attribute each time it is called. get_speed - the get_speed method should return the current speed.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Choose the best explanation for the following statement communication is symbolic
Answers: 3
question
Computers and Technology, 24.06.2019 00:30
Afiling system in which an intermediary source of reference, such as a file card, must be consulted to locate specific files is called a(n) system. a. shelf filing b. direct filing c. indirect filing d. shingling
Answers: 1
question
Computers and Technology, 24.06.2019 06:30
Ineed to know the anwser to all these questions
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Which of the statements below describe the guidelines for the use of text in presentation programs? a. do not use numbered lists. b. fonts should be appropriate for your audience. c. limit the number of fonts you use to three or four. d. only use bulleted lists for sales promotions. e. select font sizes that are appropriate for your delivery method. f. use font colors that work well with your background. select all that apply
Answers: 1
You know the right answer?
Write a class named car that has the following data attributes: __year_model (the car’s year model)...
Questions
question
Physics, 10.12.2020 01:40
question
English, 10.12.2020 01:40
question
English, 10.12.2020 01:40
question
Mathematics, 10.12.2020 01:40
question
Mathematics, 10.12.2020 01:40