[Tutor] Is this possible for a newbie?

Joseph Lee joseph.lee22590 at gmail.com
Mon Jul 21 02:18:36 CEST 2014


Hi,
Answers are below.


 ----- Original Message -----
From: keith papa <keithadu at live.com
To: "tutor at python.org" <tutor at python.org
Date sent: Sun, 20 Jul 2014 16:57:24 -0400
Subject: [Tutor] Is this possible for a newbie?

Am a newbie to programming and I started learning python days 
ago.  I have this idea I want to execute, am a big sport and 
fantasy fan and I wanted to create something that will make it 
things a little easy for me.  My idea is simple I want to create 
a program that I can enter name and some information about a 
player, for example:

NFL plays:

Jamaal Charles RB : ATT 259 , YDS 1,287 , AVG 5.0, TD 12, REC 70

Tony Romo QB: CMP% 63.9, YDS 3,828 , TD 31, INT 10, Rating 96.7

Dez Bryant WR: REC 93, YDS 1,233, AVG 13.3, LNG 79, TD 13

and other players information.

I want to be able to ask the program which QB is best on my list 
and it give me the names of all the QB on my list, or ask for WR 
on my list and it gives me all the WR on my list, and also I want 
to be able to crossed out name simply by typing the players name.
What do I need to lean in order to accomplish this? string, 
variable functions?
feel free to ask any questions.

JL:
I think learning about tuples and dictionaries might be your 
friends.  There is a data type called tamed tuple that assigns 
names to fields, so you can ask your program to give you needed 
info by sorting by field names.
Hope this helps.
Cheers,
Joseph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: attachment
Type: application/octet-stream
Size: 184 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/tutor/attachments/20140720/fef11eec/attachment-0001.obj>


More information about the Tutor mailing list