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
4vir4ik [10]
2 years ago
16

Can someone tell me why this keeps exiting no matter what move and how I can fix it I honestly hate this class... you guys can h

ave 100 points
#Andrew
#IT140
#ModuleSixMilestone
rooms = {'Manor Entrance': {'South': 'Foyer'},
'Foyer': {'North': 'Manor Entrance', 'West': 'Cellar'},
'Cellar': {'East': 'Foyer'},
'Exit': {'Exit': 'Exit'}} # The dictionary links a room to other rooms.

currentRoom = 'Manor Entrance' # Start the player in the Manor Entrance.


print('Move commands: North, South, East, West, Exit.')
print(' ------------------- ')
print('You are in the Manor Entrance.')
print('Enter your move or exit the game. -> ')
# User input a command to either move to another room or exit the game.
# If the player enters "exit", the game should move them to the "exit" room.
moveCommands = ['North', 'South, ''East', 'West', 'Exit']
command = input()

# Gameplay loop for moving to different rooms.

if currentRoom == rooms['Manor Entrance']:
if command == 'Exit': # If the player enters "exit", the game should move them to the "exit" room.
print('The virus will destroy the world now that you have quit.')
elif command == 'South':
print('You entered the Foyer!')
print(currentRoom[1])
elif command <= 'South':
print('Error. Try again!') # Print an error message if the player enters an invalid direction.

if currentRoom == rooms['Foyer']:
if command == 'Exit': # If the player enters "exit", the game should move them to the "exit" room.
print('The virus will destroy the world now that you have quit.')
elif command == 'West':
print('You entered the Cellar!')
print(currentRoom[2])
elif command <= 'West':
print('Error. Try again!') # Print an error message if the player enters an invalid direction.

if currentRoom == rooms['Cellar']:
print('You win! You have made it to the Cellar and destroyed the Nemesis!')
if command == 'Exit': # If the player enters "exit", the game should move them to the "exit" room.
print('You have eradicated the Virus.')
Computers and Technology
1 answer:
velikii [3]2 years ago
7 0

Answer:

Something like this?

The only requirement this doesn't exactly hit is moving the user to the "exit" room. It doesn't make use of that entry in the dictionary. However, this is the best way of doing it to avoid multiple "if" statements.

You might be interested in
Which of the following are safety guidelines when socializing online?
DochEvi [55]

Answer:

All of them execpt five and three.

Explanation:

It is okay to have social media and receive messages.

3 0
2 years ago
Which of the following is a valid HTML tag?<br> Oo<br><br> &gt;hl
siniylev [52]

Answer:

>hl is a valid HTML tag.

3 0
3 years ago
Allows a service provider organization to own and manage the infrastructure (including computing, networking, and storage device
djverab [1.8K]

Answer:

The answer is "Public Cloud computing".

Explanation:

It is a type of technology that focusing on domain-specific resources rather than using dedicated servers or intelligent machines. All services are provided as well as used throughout the Network and per user are paid, and certain options were wrong which can be described as follows:

  • In option 1, it is used to describe the details, it doesn't store data.
  • In option 2, It is used in the organization.
  • In option 3, It is used for courts or legal documentations.
7 0
4 years ago
What are the important role that health care workers play in documentation, confidentially, maintenance and credibility of the m
Anna007 [38]
75. Health care workers are those persons who makes sure that they documented everything about their patient’s health problem. They also makes sure that they maintain those documentations and make sure the credibility and confidentially of an individual that undergone their care. It is their responsibility that this is keep confidential based on their patient’s request and also in their job’s duty. Once a health care worker divulge any confidential information, he or she can be given by a person a case in the court.
8 0
4 years ago
Project: big research project
a_sh-v [17]

Answer:

Where is the question?

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • Which statement identifies what the students will be graded on?
    5·2 answers
  • Platon says, when taking a photo you should:<br> (Photography class)
    5·1 answer
  • An internet service provider has three different subscription packages for its customers.  Package A: For $9.95 per month 10 ho
    10·1 answer
  • Can you think of a shortcut for calculating the network addresses of consecutive /30 subnets?
    9·1 answer
  • You can decide if a paint booth filter is hazardous waste by answering which of the following questions: A) Is the paint residue
    12·2 answers
  • Which utility would you use to return the common name of the computer you're at? Execute this command and submit screen shots.
    11·1 answer
  • The Joint Photographic Experts Group developed the ___________ graphic format.
    12·2 answers
  • What happens if none of the selector values match selector in a simple case expression in pl/sql
    6·1 answer
  • Calculate the value of z. Given v=4, w=5, x=8, y=2z= (v+ w) * x / y;print (“value of z is “, z)
    8·1 answer
  • Define and use in your program the following functions to make your code more modular: convert_str_to_numeric_list - takes an in
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!