Programming Forums
User Name Password Register
 

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

Reply
 
Thread Tools Display Modes
Old May 1st, 2006, 9:49 AM   #1
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 159
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
need to get more complex

i need to find more and harder things for me to make. i am making simple things like this
name = raw_input("Whats youe name? ")
print "Your name is ", name
raw_input("Press Enter Key ...") # wait

so if someone can help me by telling me what would be something more challenging for me ot make. i would like that.
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old May 1st, 2006, 10:13 AM   #2
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
Smile

You know those e-mails you get where somebody sends an e-mail of an e-mail of an e-mail:
>> You know you're in California ! when...... 
>>
>> 1. You make over $300,000 and still can't afford a house. 
>>
>> 2. You take a bus and are shocked at two people carrying on
>>    a conversation in English. 
>>
>> 3. Your child's 3rd-grade teacher has purple hair, a nose ring,
>>    and is named Breeze. 
>>
>> 4. You can't remember ... is pot illegal? 
>>
>> 5. You've been to a baby shower that has two mothers and a 
>>    sperm donor.
>>
>>
Write a Python program to remove all the >> gibberish, so you have normal text again.
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old May 1st, 2006, 10:47 AM   #3
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 159
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
ok. i will have to look up on that because i really dont know much about this yet. that is the only thing i have been making. i dont know any other things to make.
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old May 1st, 2006, 11:24 AM   #4
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
You could make a program that translates a text file into ROT13 (where the letters of the alphabet are shifted 13 places).

Or a number guessing game.

Or a hangman game.
Arevos is offline   Reply With Quote
Old May 1st, 2006, 11:53 AM   #5
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 159
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
that hang man game sounds easy to make.
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old May 2nd, 2006, 9:39 AM   #6
Dietrich
Professional Programmer
 
Dietrich's Avatar
 
Join Date: Feb 2005
Posts: 434
Rep Power: 4 Dietrich is on a distinguished road
You can make your original program more complex and have some fun too:
name = raw_input("Whats your name? ")
print "Your name is ", name

# do something with the name
if 'a' in name.lower():
    name1 = name.replace('a', 'e')
    name2 = name.replace('a', 'u')
    print "Your name could have been", name1, "or", name2
    
if 'o' in name.lower():
    name1 = name.replace('o', 'e')
    name2 = name.replace('o', 'u')
    name3 = name.replace('o', 'oo')
    print "Your name could have been", name1, "or", name2, "or even", name3
    
if 'i' in name.lower():
    name1 = name.replace('i', 'a')
    name2 = name.replace('i', 'oo')
    print "Your name could have been", name1, "or", name2

raw_input("Press Enter Key ...") # wait
Substitute other letters, give it a try!
__________________
I looked it up on the Intergnats!
Dietrich is offline   Reply With Quote
Old May 2nd, 2006, 1:18 PM   #7
demon101
Hobbyist Programmer
 
demon101's Avatar
 
Join Date: Mar 2006
Location: westboro, ohio
Posts: 159
Rep Power: 0 demon101 is an unknown quantity at this point
Send a message via Yahoo to demon101
Quote:
Originally Posted by Dietrich
You can make your original program more complex and have some fun too:
name = raw_input("Whats your name? ")
print "Your name is ", name

# do something with the name
if 'a' in name.lower():
    name1 = name.replace('a', 'e')
    name2 = name.replace('a', 'u')
    print "Your name could have been", name1, "or", name2
    
if 'o' in name.lower():
    name1 = name.replace('o', 'e')
    name2 = name.replace('o', 'u')
    name3 = name.replace('o', 'oo')
    print "Your name could have been", name1, "or", name2, "or even", name3
    
if 'i' in name.lower():
    name1 = name.replace('i', 'a')
    name2 = name.replace('i', 'oo')
    print "Your name could have been", name1, "or", name2

raw_input("Press Enter Key ...") # wait
Substitute other letters, give it a try!

i really dont know how to use loops yet.
__________________
Demon101 Production's

Code Forums
demon101 is offline   Reply With Quote
Old May 2nd, 2006, 2:15 PM   #8
snipertomcat
Programmer
 
snipertomcat's Avatar
 
Join Date: Nov 2005
Location: Spring Valley, CA
Posts: 52
Rep Power: 3 snipertomcat is on a distinguished road
Here homie...check this out then try pounding out ur program.
http://honors.montana.edu/~jjc/easytut/easytut/
snipertomcat is offline   Reply With Quote
Old May 2nd, 2006, 6:16 PM   #9
Jessehk
The Oblivious One
 
Jessehk's Avatar
 
Join Date: May 2005
Location: Ontario, Canada
Posts: 644
Rep Power: 4 Jessehk is on a distinguished road
Quote:
Originally Posted by demon101
i really dont know how to use loops yet.
Those are not loops. They are if statements. If the test in an if statement evaluates to True, the resulting code will be executed.

For example:

x = 3

if x == 4:
    print "This will not be printed, as the above condition will not be met"
elif x == 3:
    print "The above statement evaluates to True, \nand this message will be printed"
__________________
Dr. Zoidberg: [ecstatic] I'm going to a movie... with FRIENDS!
Jessehk is offline   Reply With Quote
Old May 2nd, 2006, 8:02 PM   #10
hervens48
Programmer
 
Join Date: Apr 2006
Location: Montreal, Canada
Posts: 95
Rep Power: 3 hervens48 is on a distinguished road
Send a message via AIM to hervens48 Send a message via MSN to hervens48
dont limit urself to console programming. Keep on learning, theres much more to programming than printing something on the screen. Especially the fact that u dont know loops. So keep on reading and learning, than move on to win32 programming, than move on to directx programmign and make awsome flash games that u can publish on mofunzone Or u can even set up a team and make ur own quake.
hervens48 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




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

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