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

In Problem Set 1, Problem 1 I seem to be getting an answer that is a few cents off of what the Professor says the answer should be in test case 1. Heres my code: http://pastebin.com/d5P8MpYR Any help is greatly appreciated! Thanks!

OpenStudy (siberman):

Hey, i haven't done this pset, they must have changed the course since i did it, but I would as why you are asking for the balance as an int not a float?

OpenStudy (anonymous):

I'm not sure why I used an int instead of a float but, I get the same answer either way. Could the reason that I'm getting a different answer be that I'm using python 2.7.3 instead of 2.5.4?

OpenStudy (anonymous):

I ran the sample solution and I'm getting the same answers. May be something changed with the round function between 2.5.4 and 2.7.3.

OpenStudy (anonymous):

http://dpaste.com/763728/

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!