Recent: Fix food processor motor?

Mend Desktop PCs

Mend Computers, Desktop PCs
Find out how to mend it for free.

Ask Question
Mend Computers, Desktop PCs
Mend repair fix desktop pcs

Mend > Desktop PCs

Mend Code Work Help

Why doesn't this code work?

I don't understand why this code doesn't work, it is from python and I have been trying to debug it for an hour! Can someone help?

print "Wlecome to Talk or Argue"
print "Type in the correct information below as prompted"

name = raw_input("Whats your name? " "")




age = raw_input("How old are you? " "")




friend = raw_input("What would you like your friend's name to be? " "")




talkOrArgue = raw_input("Would you like to talk or argue? " "")



ready = raw_input("Are you ready? Yes or No? " "")

proceed = "yes" or "Yes" or "YES" or "yES" or "yEs"

if ready == proceed:
print "You are ready"
print "You're name is", name
print "You are", age, "years old"
print "You're friend's name is", friend
print "And you are going to", talkOrArgue




argue = "Argue" or "argue"

talk = "Talk" or "talk"

if talkOrArgue == talk:
print "Well you are one of the only talkative ones"
else:
print "Wow, you are arguementative."

Roberto
December 2013
As an aside, most programing languages have something to convert a literal string to all lower or upper case.
Usualy, it's something like touper and tolower.
Using that would greatly simplify your code, and maybe solve your problem.

To cover all permutations, this statement:
proceed = "yes" or "Yes" or "YES" or "yES" or "yEs"
would realy need 8 permutations, not only 5, but only a single "yes" or "YES" after converting to all lower or upper case.

Electro
December 2013
This is not the correct place to ask.

Try in Software|Application devlopment OR on a forum dedicated to Python programming.
Take a look at python.org.

Did you try here: http://python.org/community/

Electro
December 2013

Automatic Answer

We may have found other answers which could help you.

Click here for Code Work Help

Mend Computers, Desktop PCs
Mend repair fix desktop pcs

How to mend ...

Find out how to mend just about anything howtomendit.com for free repair help, information and advice.
Mend Computers, Desktop PCs
Mend repair fix desktop pcs