![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Nov 2007
Posts: 64
Rep Power: 1
![]() |
I'm a Beginner
Hello all I am new here. I have taken a course on Python so I guess I could say I know Python code. Unfortunatly the online course I took never put the different parts together. So while i can write a tupple and a list, I can't write a multi-step program with it. I was wondering if someone could show me how to apply the little knowledge I got from that course. I started programing so I could begin writing games so maybe someone could find the code to a simple game like Pong and walk me through it. Thank you for taking your time to help a beginner programer out.
|
|
|
|
|
|
#2 |
|
Programming Guru
![]() |
Re: I'm a Beginner
Sure thing. But no one here can conjure information from nothing.
Do you have any particular questions? Code you can not get working? You reference being able to work with tuples and lists, but can't write a multi-step program? What problem are you running into? A program is simply a sequence of lines, or steps, that are sequencially interpreted. So if you want to combine a program that works with tuples, with a program that works with lists, it's as simple as putting the two together. MyListProgram.py # This is my list
fruits = ['Apple', 'Banana', 'Pear']
# Go through each fruit in the list
for fruit in fruits:
# Output the fruit
print fruitMyTupleProgram.py # This is my tuple
prices = ('1$ Per Bag', '2$ Per Basket')
# Go through each price in the tuple
for price in prices:
# Output the price
print priceCombinedProgram.py # This is my list
fruits = ['Apple', 'Banana', 'Pear']
# This is my tuple
prices = ('1$ Per Bag', '2$ Per Basket')
# Go through each fruit in the list
for fruit in fruits:
# Go through each price in the tuple
for price in prices:
# Output the fruit and the price
print fruit, price |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Nov 2007
Posts: 64
Rep Power: 1
![]() |
Re: I'm a Beginner
I did learn how to cross the lists and tuples but I can't exactly do anything with those lists and tupples. What I meant was I couldn't find how to mix everything together to make a large program.
Your question if I am having problem with code is no, since I can't write code
__________________
There are 10 kinds of people in this world, those who can read binary and those who can't. |
|
|
|
|
|
#4 |
|
Expert Programmer
|
Re: I'm a Beginner
You'll have to be much more specific if you want help.
|
|
|
|
|
|
#5 |
|
Programming Guru
![]() |
Re: I'm a Beginner
|
|
|
|
|
|
#6 |
|
Programmer
Join Date: Jun 2007
Posts: 99
Rep Power: 2
![]() |
Re: I'm a Beginner
reading and messing around with code is not generally considered knowing the language.
if you really understood how to code you wouldn't be asking these sorts of questions. you should consider flicking through: http://www.catb.org/~esr/faqs/smart-questions.html on the other hand you need to think of a real world program and code it - something simple a calculator, time zone calculator or even a numbers guessing game it's up to your imagination to code something. |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Nov 2007
Posts: 64
Rep Power: 1
![]() |
Re: I'm a Beginner
Your right I guess that was a bad question. Here is a better question, can someone give me a link to a Good Python tutorial site? Possibaly the one you learned from. I have tried google and all it gave me was a lot of poorly done tutorials on Python that is meant for the expirienced programer anyways.
__________________
There are 10 kinds of people in this world, those who can read binary and those who can't. |
|
|
|
|
|
#8 |
|
Programming Guru
![]() |
Re: I'm a Beginner
Many people here were born and raised by Python's How To Think Like A Computer Scientist. It's very thorough, yet simple and succinct.
|
|
|
|
|
|
#9 |
|
Expert Programmer
|
Re: I'm a Beginner
I learned Python via Mark Pilgrim's book Dive Into Python. (You can read the book for free online in a variety of formats.) I highly recommend it.
|
|
|
|
|
|
#10 |
|
Programmer
Join Date: Nov 2007
Posts: 64
Rep Power: 1
![]() |
Re: I'm a Beginner
(Chuckiferd's jaw drops, he then takes out reading glasses)
Ah-em.. this might take a wiee bit.
__________________
There are 10 kinds of people in this world, those who can read binary and those who can't. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Beginner Problem | proudnerd | C++ | 16 | May 18th, 2006 6:48 PM |
| call of a beginner | web_master | HTML / XHTML / CSS | 34 | Dec 6th, 2005 12:08 AM |
| function help for a beginner | melee28 | C | 6 | Sep 5th, 2005 9:45 AM |
| what open source code is good to read for a beginner? | linuxpimp20 | Other Programming Languages | 22 | Aug 30th, 2005 3:01 PM |
| Beginner program problem (else if) | Hadrurus | Java | 13 | Aug 14th, 2005 7:07 PM |