Ask your own question, for FREE!
MIT 6.189 A Gentle Introduction to Programming Using Python (OCW) 18 Online
OpenStudy (anonymous):

I need some help. i dont understand this at all. https://media.education2020.com/manuals/CSC210/Assignment%204B%20-%20EL5723.pdf

OpenStudy (e.mccormick):

Do you know what a while loop is? Do you know what the input function is? Do you know how to do a string comparison? Do you know what a conditional statment is? Do you know what the break command does? I see all of those concepts as being needed for this. Once I know which ones you have trouble with, I can answer those specific issues.

OpenStudy (anonymous):

I don't understand how to start writing the code. I know it says to start with the while loop but how do you put the input function into the while loop? And i have an idea of what the string comparison and conditional statement but not to sure of what the break command does.

OpenStudy (anonymous):

@e.mccormick

OpenStudy (e.mccormick):

Break gets you out of a loop. So when the condition is that someone types "quit" you have the if trigger the break. How to put things inside the loop is to indent them the same way. In psudocode: ``` while true: input this if this == quit: break format(this) ``` So all the things with four spaces are inside the while. The if body has 8 sapces so it is inside the if, which is inside the while.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!