Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 3rd, 2007, 4:49 PM   #1
Chuckiferd
Programmer
 
Join Date: Nov 2007
Posts: 64
Rep Power: 1 Chuckiferd is on a distinguished road
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.
Chuckiferd is offline   Reply With Quote
Old Dec 3rd, 2007, 4:56 PM   #2
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,835
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
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 fruit

MyTupleProgram.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 price

CombinedProgram.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
Sane is offline   Reply With Quote
Old Dec 3rd, 2007, 7:16 PM   #3
Chuckiferd
Programmer
 
Join Date: Nov 2007
Posts: 64
Rep Power: 1 Chuckiferd is on a distinguished road
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.
Chuckiferd is offline   Reply With Quote
Old Dec 3rd, 2007, 7:28 PM   #4
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 843
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
Re: I'm a Beginner

You'll have to be much more specific if you want help.
titaniumdecoy is offline   Reply With Quote
Old Dec 3rd, 2007, 9:59 PM   #5
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,835
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: I'm a Beginner

Quote:
Originally Posted by Chuckiferd View Post
Your question if I am having problem with code is no, since I can't write code
Well there's your problem.
Sane is offline   Reply With Quote
Old Dec 3rd, 2007, 10:08 PM   #6
MiKuS
Programmer
 
Join Date: Jun 2007
Posts: 99
Rep Power: 2 MiKuS is on a distinguished road
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.
MiKuS is offline   Reply With Quote
Old Dec 4th, 2007, 8:29 PM   #7
Chuckiferd
Programmer
 
Join Date: Nov 2007
Posts: 64
Rep Power: 1 Chuckiferd is on a distinguished road
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.
Chuckiferd is offline   Reply With Quote
Old Dec 4th, 2007, 9:19 PM   #8
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,835
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
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.
Sane is offline   Reply With Quote
Old Dec 4th, 2007, 9:29 PM   #9
titaniumdecoy
Expert Programmer
 
titaniumdecoy's Avatar
 
Join Date: Nov 2005
Posts: 843
Rep Power: 3 titaniumdecoy is on a distinguished road
Send a message via AIM to titaniumdecoy
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.
titaniumdecoy is offline   Reply With Quote
Old Dec 5th, 2007, 3:16 PM   #10
Chuckiferd
Programmer
 
Join Date: Nov 2007
Posts: 64
Rep Power: 1 Chuckiferd is on a distinguished road
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.
Chuckiferd is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 1:35 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC