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
Why is the song Twinkle Twinkle Little Star an example of ternary form?
Bogdan [553]

Answer:

p it has a three-part musical form it has a repeating section and a following section this makes and this makes it a ternary form

5 0
3 years ago
Re:
aksik [14]

Answer:

A) create new records

B) open and close forms

C) open database forms

F) navigate through records

G) import and export data

Explanation:

5 0
3 years ago
Why is computer called information processing maching???​
Vaselesa [24]

☆ <u>Since, the computer accepts raw data as input and converts into information by means of data processing, it is called information processing machine (IPM).</u>

HOPE IT HELPS ❣️

7 0
3 years ago
Read 2 more answers
WHAT TYPES OF ACTIVITIES ARE PERFORMED BY HEALTH CARE SOFTWARES
Makovka662 [10]

Answer:

lectronic Health Record (EHR) Software. ...

Medical database software. ...

Medical research software. ...

Medical diagnosis software. ...

Medical imaging software. ...

E-prescribing software. ...

Telemedicine software. ...

Appointment scheduling (booking) software.

6 0
3 years ago
Drag each tile to the correct box.
garri49 [273]
I think select the video insert select the movie option under illustrations resize the video player then select the insert tab i’m not 100 percent sure tho
8 0
3 years ago
Read 2 more answers
Other questions:
  • Explain what the 35ppm specification means
    13·1 answer
  • Write a for loop to print all elements in courseGrades, following each element with a space (including the last). Print forwards
    7·1 answer
  • A bookmarking site is a website that enables members to manage and share media such as photos, videos, and music. true or false
    14·1 answer
  • What should be included in the closing portion of your letter or e-mail?
    12·2 answers
  • Two samples of dirt are collected from a suspect's tread in his shoe and a crime scene. The forensic investigator does a gross e
    6·2 answers
  • A class defined by a user (i.e., you, the programmer programmer) ... Group of answer choices might contain no data members -- on
    13·1 answer
  • Mihaela I. Croitoru – Utilizarea calculatorului personal Microsoft Word dau coroana
    14·1 answer
  • The function below takes two arguments, a dictionary called dog_dictionary and a list of dog names (strings) adopted_dog_names.
    8·1 answer
  • Help plz!! I will mark brainliest
    15·2 answers
  • How does digital and hybrid computers differ in portability​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!