Question: USE PYTHON3; DON'T IMPORT ANY PACKAGES Please follow all directions carefully. Thank you! 2. We will learn how to create classes in our code. Follow

USE PYTHON3; DON'T IMPORT ANY PACKAGES

Please follow all directions carefully. Thank you!

2. We will learn how to create classes in our code. Follow the respective directions carefully, and make sure to pay extra attention to bolded instructions.

b)

Note: The entire function will initially be commented out in the starter code since we have the ***** placeholders that will cause a syntax error. You can remove the '''s when you are ready to start working on this question.

Create a class called Stove that represents a Stove object. A Stove object uses methods (that returns strings describing its interactions. See the doctests below for examples). You need to fill in the blanks (replace ***** with your code) in order to make doctests work.

class Stove: """ >>> stove = Stove("GM", "pie", 350) >>> stove.brand 'GM' >>> stove.dish 'pie' >>> stove.temp 350 >>> stove.change_temp(400) >>> stove.change_dish('beans') >>> stove.what_is_cooking_what_temp() 'beans at 400' >>> stove.change_temp(450) >>> stove.what_is_cooking_what_temp() 'beans at 450' """ def *****(*****, brand, *****, temp): self.***** = brand self.***** = ***** *****.***** = *****

def change_temp(self, new_temp): *****.***** = *****

def change_dish(*****, new_dish): *****.***** = new_dish

def what_is_cooking_what_temp(*****): return *****

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!