EvilZone

Programming and Scripting => Scripting Languages => Topic started by: dillond21 on July 20, 2012, 03:54:42 PM

Title: What is wrong with this code!?
Post by: dillond21 on July 20, 2012, 03:54:42 PM
Okay so I have been coding in Python and i was just trying to make a simple program but for some reason i can't figure it out! Any help would be awesome.
Here it is:

Code: (python) [Select]
print ('Hello!')
print ('What is your name?')
myName= input()
print ('Nice to meet you ' +  myName)
print ( 'What do you like to do')
myHobbies=input()
if myHobbies=('nothing'):
    print("Oh, that's too bad")
print ('Oh I LOVE too' + myHobbies)
print('Have you ever tried bowling professionally?')
myBowl=input()
print("Don't lie!!!")
mylie=input()
print('Okay I believe you, but i have to go!')
print (' Bye!')
end=input()

If you noticed i tried to add in a little area where someones answer might be no, or nothing but i don't really know how, this was just a guess. Anyway the program won't run, so what should i do?

Title: Re: What is wrong with this code!?
Post by: iTpHo3NiX on July 20, 2012, 06:14:03 PM
asdf
Title: Re: What is wrong with this code!?
Post by: Kulverstukas on July 20, 2012, 06:18:01 PM
Moved to Scripting languages board and edited your post.
Code seems inconsistent, and 9th line should be in the "else" part of the "if". Also use "raw_input".
Title: Re: What is wrong with this code!?
Post by: dillond21 on July 20, 2012, 07:40:25 PM
Use raw_input for the entire thing?
And substitute else for if?

Title: Re: What is wrong with this code!?
Post by: iTpHo3NiX on July 20, 2012, 08:28:20 PM
asdf
Title: Re: What is wrong with this code!?
Post by: dillond21 on July 21, 2012, 01:34:24 AM
Thanks! And haha i won't double post! Hahaha, I'm just trying to get on your level ;)