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.
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
cheers...very helfpful
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)?
limiting the loops will definitely save processing time.
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.
Join our real-time social learning platform and learn together with your friends!