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
maks197457 [2]
3 years ago
15

You need to implement a class that represents the state of a room or game section. The class will contain a room_id, a descripti

on, and possibly a choice1 and a choice 2. You will need to implement the __str__ override to output the state of the room. You should also implement a method called game_over. If the room does have a choice 1 and choice2 then the game is over and it should return True.
Computers and Technology
1 answer:
qaws [65]3 years ago
4 0

Answer:

class Home(object):

   def __int__(self):

       room1()

  # room1 is the bedroom, you could either sleep or leave the room

   def room1(self):

       print("Room 1")

       choices = ['sleep', 'leave']

       for _ in iter(list, 0):

           mychoice = input("What do you want to do here sleep/leave: ")

           if mychoice == choice[0]:

               print("You are sleeping")

           elif mychoice == choice[1]:

               self. room2()

           else:

               self. game_over()

   # room2 is the living room for fun and recreation

   def room2(self):

       print("Room 2")

       choices = ['watch a movie', 'dance', 'call a friend', 'leave']

       mychoice = input("What do you want to do here: ")

       for _ in iter(list,0):

           if mychoice == choice[0]:

               print("I love this movie")

           elif mychoice == choice[1]:

               print("You are a good dancer.")

           elif mychoice == choice[2]:

               self. room1()

           else:

               self. game_over()

   # this method ends the program

   def game_over(self):

       quit()

Explanation:

The simple python object oriented program defines class with three methods room1, room2 and game_over which are all linked from the __init__ method from where the room1 is call first.

You might be interested in
Which three of the following are used for mobile Internet access?
AlladinOne [14]
Bluetooth wifi and cell tower
8 0
3 years ago
Read 2 more answers
Use the drop-down menus to complete the statements about printing Contacts. When printing a single contact, go to File and then
UkoKoshka [18]

Answer:

When printing a single contact, go to File and then Print; the only style available is Memo style .

When printing multiple contacts, there are several styles to choose from

Explanation:

<em>The question has been answered (by you). I will help you with the explanation. The texts in bold in the answer section represent the answer.</em>

<em />

The question is an illustration of Microsoft outlook.

In Microsoft outlook, the default style of printing is the memo style of printing. This is the only form of printing allowed when printing single contacts. In other words, other forms of printing cannot be selected.

However, there are several options available when multiple contacts are to be printied. Some of the printing styles are:  phone directory style, card style, medium booklet style, etc.

8 0
3 years ago
Kelly wants to change the text in a cell so that it is centered instead of left-aligned, where should she look to make this
timurjin [86]

Answer:

c

Explanation:

I don't know if it's correct

make me brainlist

4 0
3 years ago
how to create use an array of Course objects instead of individual objects like course 1, course 2, etc
AURORKA [14]

Answer:

To save the course object instances in an array, use;

Course[] courses = new Course[7];

courses[0] = new Course("IT 145");

courses[1] = new Course("IT 200");

courses[2] = new Course("IT 201");

courses[3] = new Course("IT 270");

courses[4] = new Course("IT 315");

courses[5] = new Course("IT 328");

courses[6] = new Course("IT 330");

Explanation:

The java statement above assigns an array of size 7 with the course class constructor, then order courses are assigned to the respective indexes of the new array.

3 0
3 years ago
What is web browser <br>​
xeze [42]
An application used to access and view websites
7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus the person's age. Complete fat_burn
    10·1 answer
  • What is the difference between primary storage,secondary storage and offline storage what type of storage can be
    6·2 answers
  • A person who wants to buy a compact disc (cd) has just enough money to buy one, and chooses cd a instead of cd
    10·2 answers
  • Which line of code will print I can code on the screen?
    13·1 answer
  • 1.Terry turned on his computer one day to find that all of the storage on his computer was filled up. Furthermore, there were ma
    6·1 answer
  • Which of the following does not use a Graphic User Interface?
    14·1 answer
  • Where do charts get the data series names?
    14·1 answer
  • Answered
    10·1 answer
  • a user complains he cannot access a particular website, although he is able to access other websites. At which layer of the OSI
    12·1 answer
  • __________ are very simple devices that connect network components, sending a packet of data to all other connected devices.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!