nextRoom while(Tue): user Input input ("Player choice: if(user Input="Northeast" nextRoom= "Town Hall" or user Input=="NE"): break elif (user Input="South" or userInput=="S"): nextRoom= "Town Archives" break elif (user Input="Southeast" or user Input == "SE"): nextRoom= "Trading Post" break else: print("Command unrecognize.") return nextRoom

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter16: Graphics
Section: Chapter Questions
Problem 2GZ
icon
Related questions
Question

In python

Type Southeast
nextRoom=""
while(Tue):
user Input = input ("Player
if(user Input=="Northeast"
nextRoom= "Town Hall"
choice:
or userInput=="NE"):
break
elif (user Input == "South" or user Input=="S"):
nextRoom= "Town Archives"
break
elif (user Input=="Southeast" or userInput=="SE"):
nextRoom= "Trading Post"
break
else:
print("Command unrecognize.")
return nextRoom
ogramming the trading post
tradingPost():
print("Welcome! You're in the Trading Post.")
print("You found a key.")
print("Type Northwest' or 'NW' to go to Car Ride.")
nextRoom=""
while(True):
userToput fout/"Player choice: "₁
Use while nextRoom ==
Change it to all uppercase or
lowercase.
Do your comparisons against all
uppercase or lowercase. This
makes it easier for the user to
play the game.
Don't use break.
Transcribed Image Text:Type Southeast nextRoom="" while(Tue): user Input = input ("Player if(user Input=="Northeast" nextRoom= "Town Hall" choice: or userInput=="NE"): break elif (user Input == "South" or user Input=="S"): nextRoom= "Town Archives" break elif (user Input=="Southeast" or userInput=="SE"): nextRoom= "Trading Post" break else: print("Command unrecognize.") return nextRoom ogramming the trading post tradingPost(): print("Welcome! You're in the Trading Post.") print("You found a key.") print("Type Northwest' or 'NW' to go to Car Ride.") nextRoom="" while(True): userToput fout/"Player choice: "₁ Use while nextRoom == Change it to all uppercase or lowercase. Do your comparisons against all uppercase or lowercase. This makes it easier for the user to play the game. Don't use break.
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Random Class and its operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,