Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I do not know why my code always display outside loop Python 3.6.1 (default, Dec 2015, 13:05:11) GCC 4.8.2] on linux 6 #int roduce self

I do not know why my code always display outside loop image text in transcribed
Python 3.6.1 (default, Dec 2015, 13:05:11) GCC 4.8.2] on linux 6 #int roduce self as nosy question bot 7 print("hello!I am nosy question bot!) 8 #create question list 9 questions-["how old are you?", "where are File "main.py", line 21 break SyntaxError: 'break' outside loop 10 11 12 you from?", "how much do you weigh?"] #makea responses list responses-["i see", "interesting", "good"] #ask questions by looping throuhg th equestion list 13 for question in questions: 14 15 #print the question 16 print(question) 17 #get the responses 18 reply-input() 19 #if they said stop, then break 20 if reply-"stop": 21 22 #make a raddom reply 23 print(random.choice(responses)) 24 #end the conversation 25 print("thank you") break

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

Step: 3

blur-text-image

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

More Books

Students also viewed these Databases questions