[Tutor] Chapter 3 Projects

Mariel Jane Sanchez zac_vanessa1fan at yahoo.ca
Mon Mar 25 00:38:48 CET 2013


Hi, I'm sort of new to Python. I'm taking Computer Science 10 and I'm now on Chapter 3. I don't really get how to do the first three projects.

Okay, so for the first project, I don't know how to input the ranges like 0-999, 1000-9999, 10000+ and even the negatives. Like when I run it on the shell, it doesn't have any errors whatsoever but it does another thing especially when I put 1000000, my typed phrase "Good Score" shows up when "Very Impressive" is the appropriate phrase to go with that score. And when I put in a negative score it says the same thing instead of saying it's an invalid score. How do I put those ranges so that the phrases match with it? 

I don't have the book nor the PDF at home, it's in school but I'm sure the second project is about flipping a coin 100 times and I have to show how many heads and tails where randomly flipped. My problem is that, I do get a random number for each sides of the coin but the number is either below or above 100. What am I doing wrong?

Lastly, the third project is doing the same thing as one of the demo codes. I have to make a guessing game that only gives the player 5 tries. I just don't understand how to end the loop when the user used up their 5 chances. When I run it and tried to guess the number, it's still the same as the demo code where I can guess as long as I want. What do I put to only have 5 chances? Also, how do I match the 2 phrases? For example, the player guessed the number within 5 attempts, the phrase that is congratulating the player should pop out and vise versa when the player exceeded his chances.

I worked on Chapter 3 review questions for the whole class, spent 2 class or less on the demos and the projects took me like 3 days and I'm still working on it. I do try to figure it out myself through trial and error but these projects got me. Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20130324/34ef61aa/attachment.html>


More information about the Tutor mailing list