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
Describe an energy problem a city in 2050 will face
UkoKoshka [18]

If hydro electricity or any other alternative resources are used then there mightn't arise the problem of energy but if continuos non-renewable energy is used then of course there will occur an scarcity of energy....

I don't say u must have to mark my ans as brainliest but if it has really helped u then my frnd plz don't forget to thank me...

5 0
3 years ago
If 200.123.4.6 is a classful internet protocol (ip) address, what class is it in?
REY [17]

200.123.4.6 is a classful internet protocol (ip) address located in class C.

An IP address (internet protocol address) is a numeric representation. This numerical representation uniquely identifies a particular interface on the network.

Address in IPv4 that has a length of 32 bits. This allows a maximum of 4,294,967,296 (232) unique addresses. Addresses in IPv6 are 128-bits long, which allows for 3.4 x 1038 (2128) unique addresses.

The total usable address pools of both versions are subtracted by the various reserved addresses and other considerations.

IP addresses can also be defined as binary numbers but are usually expressed in decimal form (IPv4) or hexadecimal form (IPv6) to make it easier for humans to read and use them.

You can learn more about IP addresses here brainly.com/question/18722788

#SPJ4

4 0
1 year ago
F he continues to make monthly payments of $100, and makes no new purchases, how many more payments will he have to make before
castortr0y [4]

What is the interest rate?

Divide the total amount due by 100.

8 0
3 years ago
Its Inventiveness, uncertainty and futuristic ideas typically deals with science technology, what is it?
Margarita [4]

Answer:

It disrupt the established social contract, in the same way that invasive species do in natural ecosystems.

Explanation:

8 0
3 years ago
Read 2 more answers
What kind of advertising is used in Saunders's story when a man and his grandson walk down the street? O A. An individualized au
omeli [17]

Answer: An individualized audio device.

Explanation:

Advertising simply refers to an attempt which is made by an individual or company in order to influence the buying behavior of the customer by convincing them to buy a product.

The kind of advertising that is used in Saunders's story when a man and his grandson walk down the street is an individualized audio device. Therefore, the correct option is A.

8 0
3 years ago
Other questions:
  • The numbers on the bottom of a typical check represent all of the following EXCEPT?
    12·2 answers
  • Using a loop, write a program that reads in exactly five integers and outputs the sum.
    11·1 answer
  • A publisher has a text-only leader board on top of a page, and a text-only small square ad slot within the content of that page.
    7·1 answer
  • Given the strings s1 and s2 that are of the same length, create a new string consisting of the last character of s1 followed by
    10·1 answer
  • Why do some people think the global<br> economy is good for the United States?
    10·1 answer
  • Write a program that echos back any inputted integer greater than 1, and exits when a 0 is entered. Your program should use a co
    11·1 answer
  • Experienced students may serve as mentors if they are at least age 21 and have at least 3 years of post-secondary education. In
    5·1 answer
  • In the digital age we have less time to absorb and make sense of new information
    12·2 answers
  • Ema Company for business .
    14·1 answer
  • Why aren't my skullcandy bluetooth headphones connecting to my school chromebook if I turned on both the headphones and the blue
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!