Re: [Tutor] Project help

2012-10-13 Thread Steven D'Aprano

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
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Project help

2012-10-13 Thread Steven D'Aprano

On 13/10/12 16:54, Devin Jeanpierre wrote:

Do your own homework.


Oooh, nasty. Next you'll be using ... sarcasm. Perhaps even ... irony.

http://www.youtube.com/watch?v=Ygg2KlicnOQ
http://www.youtube.com/watch?v=evj24bXakqg


--
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Project help

2012-10-13 Thread Mark Lawrence

On 13/10/2012 06:54, Devin Jeanpierre wrote:

Do your own homework.

-- Devin



Manners if you don't mind.  We don't want to drive newbies away from 
Python by being harsh towards them.  So it's do your own homework, please :)


--
Cheers.

Mark Lawrence.

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Project help

2012-10-13 Thread Alan Gauld

On 13/10/12 05:55, Brett Dailey wrote:

I'm working on a few projects and need some help.


We don;t do homework but we can offer suggestions. But first we need 
more detail.

What is your programming language/version/OS?
What GUI framework are you using?
What is your skill level? Can you use other languages?


Credits
1. Create a list of strings. Make sure your program will work with any
number of strings.


Can you do this bit? If not you are in deep trouble!


2. Make this text appear at the bottom of the screen and “crawl” to the
top.

Can you create a GUI 'screen' - aka window?
Can you make the text appear at the bottom?
Can you make it appear at the middle and top?
Can you make the text disappear?

If so you have all the components you need to do the crawling bit


The crawl should be at a slow
  speed (~20 pixels/s) and should run at the same rate on any computer.


Can you program a delay in your GUI framework?


3. It should fade from black (near the bottom) to white, and then back
to black (at the top).


Can you change the colour of text in your GUI?


4. The program should end when the user pressed escape or hits the
“Quit-box”


Can you program commands and bind them to keys/buttons?


Here's the second one:


Lets deal with one thing at a time...



--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


[Tutor] Project help

2012-10-12 Thread Brett Dailey
I'm working on a few projects and need some help. Here's what the first one 
needs to do:

Credits
1. Create a list of strings. Make sure your program will work with any number 
of strings.
2. Make this text appear at the bottom of the screen and “crawl” to the top. 
The crawl should be at a slow
 speed (~20 pixels/s) and should run at the same rate on any computer.
3. It should fade from black (near the bottom) to white, and then back to black 
(at the top). 
4. The program should end when the user pressed escape or hits the “Quit-box”


Here's the second one:

Paint Program
1. Display a canvas inset from the main screen. 
2. Display a palette at the bottom. Allow the user to adjust the RGB current 
color. 
3. Use the mouse scroll-wheel to adjust the brush size. 
4. If the user clicks within the canvas area, draw with the current brush 
color/size 
5. If the user presses “s” save (just the) canvas to a file (“output.jpg”) 
6. Bonus: include “stamps” (sprites) that can be dragged onto the canvas.

Any help would be greatly appreciated!! These have been giving me some trouble. 
Also, if you can show me some of the code that would be great!

Thank you!!___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Project help

2012-10-12 Thread Devin Jeanpierre
Do your own homework.

-- Devin

On Sat, Oct 13, 2012 at 12:55 AM, Brett Dailey
bardockarng...@hotmail.com wrote:
 I'm working on a few projects and need some help. Here's what the first one
 needs to do:

 Credits
 1. Create a list of strings. Make sure your program will work with any
 number of strings.
 2. Make this text appear at the bottom of the screen and “crawl” to the top.
 The crawl should be at a slow
  speed (~20 pixels/s) and should run at the same rate on any computer.
 3. It should fade from black (near the bottom) to white, and then back to
 black (at the top).
 4. The program should end when the user pressed escape or hits the
 “Quit-box”


 Here's the second one:

 Paint Program
 1. Display a canvas inset from the main screen.
 2. Display a palette at the bottom. Allow the user to adjust the RGB current
 color.
 3. Use the mouse scroll-wheel to adjust the brush size.
 4. If the user clicks within the canvas area, draw with the current brush
 color/size
 5. If the user presses “s” save (just the) canvas to a file (“output.jpg”)
 6. Bonus: include “stamps” (sprites) that can be dragged onto the canvas.

 Any help would be greatly appreciated!! These have been giving me some
 trouble. Also, if you can show me some of the code that would be great!

 Thank you!!
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor