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

hi, is there anywhere i can find answers to ps2 given by various people in the past? would just like to check my workings please.

OpenStudy (anonymous):

Yes, there was a previous discussion about this problem, and two people posted their codes: http://codepad.org/4zrsw27u http://codepad.org/HuCBmLMg And here are my solutions: http://codepad.org/0UZEju4F http://codepad.org/2ErryXge

OpenStudy (anonymous):

cheers...very helfpful

OpenStudy (anonymous):

when you are iterating over a,b,c would it be more efficient if you were using range(0,y/6+1) ,range (0,y/9+1) and range (0,y/20+1)?

OpenStudy (anonymous):

limiting the loops will definitely save processing time.

OpenStudy (anonymous):

And I've got 7 indents in my code, which I'm pretty sure is the definition of terrible code writing. But my plan is to get through all the assignments with the knowledge I have at that point. (Clearly I wrote the solution for PS2 right after grasping "for" loops.) Then when I'm done with the class, I want to work on optimizing all of my solutions.

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!