Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 23 Online
OpenStudy (anonymous):

Hello everyone! I'm having some trouble with problem set #1 (2011). The value of the variables don't change in the loop and I have no ideia how to sum this values to find the total amount paid. Help?

OpenStudy (woodrow73):

Show us the code you tried?

OpenStudy (anonymous):

This is what I got so far

OpenStudy (rsmith6559):

Your for loop has one assignment statement and 4 print statements. Nothing in the loop is going to change a variable. Look over the program. There are a few lines that look like they belong in the loop, and those print statements look like they belong after the for loop.

OpenStudy (anonymous):

You need to keep your calculations inside the loop.

OpenStudy (anonymous):

wio, it worked thank you! Thanks all of you guys, really! (:

OpenStudy (anonymous):

hey here is debugged version of your script if you want it... hope it helps

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!