[Tutor] Project help

Steven D'Aprano steve at pearwood.info
Sat Oct 13 10:08:19 CEST 2012


On 13/10/12 15:55, Brett Dailey wrote:
> I'm working on a few projects and need some help.
[...]

Hi Brett, and welcome!

We like to see that people make an effort to solve their problems. This is a
list for learning about Python the language, not a list for doing people's
homework for them.

Please ask *specific* questions. One question per email. Try to make them
good questions rather than bad: the more specific you are, the more likely
someone will know the answer and can tell you.

Bad question:

"Here are three different projects and thirty five different things that I need
to do. I need help." (Answer: "I hope you find some.")


Good question:

"I have to set the colour of text to shades of grey, starting with black and
fading to white. How do I do this?"


Even better question:

"I am using PyGame with Python 2.7 on Windows and I have a field with some
text in it. I need to set the colour of each line to a different shade of
gray, starting with black at the bottom of the field and fading to white at
the top. Here is my third attempt to get it working, but the text still looks
black to me. What am I doing wrong?"

As a beginner, we're willing to cut you a lot of slack if you show that you've
made an effort. If you don't, we're likely to just ignore you.

Even if you have *no clue whatsoever* how to start on the question, try to
ask specific questions that show you've at least tried to think about it:

- how do I show text in a field?
- how do I make the text scroll?
- how do I change the colour of text?
- how do I count the number of lines of text in the field?
- I know there are 35 lines of text and the top line needs to be white
   and the bottom one needs to be black, but I have no clue how to make
   the intermediate lines fade from black to white.

etc.

Unfortunately, I know very little about graphics programming in Python, so
I have very little clue how to do this either. But if you come back with
some good questions, and preferably show us the code you've already tried,
I'm sure somebody else can help you.


Good luck!



-- 
Steven


More information about the Tutor mailing list