Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

Need a flowchart for the following python program. yes_no [yes, no] directions = [left, right, forward, backward] name = input(What is your name, adventurer? )

Need a flowchart for the following python program.

image text in transcribed

yes_no ["yes", "no"] directions = ["left", "right", "forward", "backward"] name = input("What is your name, adventurer? ") print("Greetings, " + name + ". Let us go on a quest!") print("You find yourself on the edge of a dark forest.") print("Can you find your way through? ") = response while response not in yes_no: response input("Would you like to step into the forest? yeso ") if response "yes" : print("You head into the forest. You hear crows cawwing in the distance. ") elif response "no" : print("You are not ready for this quest. Goodbye, + name + ") quit() else: print("I didn't understand that. ") = == response while response not in directions: print("To your left, you see a bear.") print("To your right, there is more forest.") print("There is a rock wall directly in front of you.") print("Behind you is the forest exit. ") response input("What direction do you move? left/right/forward/backward ") if response "left": print("The bear eats you. Farewell, + name + ".") quit() elif response "right": print("You head deeper into the forest. ") elif response "forward": print("You cannot scale the wall. ") response elif response "backward": print("You leave the forest. Goodbye, + name + ".") quit) else: print("I didn't understand that. ") == 1

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image
Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students explore these related Databases questions

Question

Write formal and informal proposals.

Answered: 3 weeks ago

Question

Describe the components of a formal report.

Answered: 3 weeks ago

Question

Write formal and informal reports.

Answered: 3 weeks ago