Question: 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  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 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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!