[Tutor] Chapter 3 Projects

Dave Angel davea at davea.name
Mon Mar 25 00:57:48 CET 2013


On 03/24/2013 07:38 PM, Mariel Jane Sanchez wrote:
> 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?
>

You can generate a range of numbers into a list with the range() 
function.  So if you want a list of all the ints between 0 and 999 
inclusive, you'd use
    mylist = range(0, 1000)

The rest of your paragrph was so unclear and incomplete that I didn't 
try to read the other paragraphs.

When you're able to post a real question, please do so.

Start by posting your email as text, not html.

Start with a problem statement (one, not three), a valid description of 
your environment, and some code that you tried. Since you claim to get 
different results when run from the shell, and from some other 
technique, I'll suggest you restrict yourself to only running from Linux 
terminal.  And include the full transcript from the Linux prompt forward.

Then describe how you ran it, what result you expected, and what you 
saw, including full traceback for any suggestion.  Be sure you use 
copy/paste, not retyping the code and messages.


-- 
DaveA


More information about the Tutor mailing list