anonymous
  • anonymous
Problem Set 1C and Practice Quiz 1 1-I wrote this code ( http://dpaste.com/hold/773969/ ) for Problem Set 1C and it doesn't give the same results that are shown in the test cases. However it gives the same results that the solution's code does. Any idea what is wrong in both? 2-Shouldn't this code ( http://dpaste.com/hold/773970/ ) print True twice? I printed x after the first and second loops and got 11.0 and 10.0. Can't understand why it prints False and True. Is it because 0.1 is not really 0.1 (it's a float)? 3- Does anyone have the answers for Practice Quiz 1?
MIT 6.00 Intro Computer Science (OCW)
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
katieb
  • katieb
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
2 - http://dpaste.com/774000/ 1 - at line 16 you probably should use something other than exactly zero for you conditional statement - maybe -0.05 < balance2 <= 0
anonymous
  • anonymous
Did someone adequately answer your number 2 question? The links are dead so I can't see what the script was, but I assume it was similar to this: x = 10.0 for i in range(10): x += 0.1 print x, i print x print x == 11.0 print x for i in range(10): x -= 0.1 print x, i print x == 10.0 print x I also don't understand why I get a False. The print x above and below line 6 both say 11.0. Any help would be appreciated...

Looking for something else?

Not the answer you are looking for? Search for more explanations.