Python Forum

Full Version: Im so stressed because I cant figure out what I'm doing wrong.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
"""
This program determines whether or not
someone has a reservation in their name.
"""

# Write your program below...
name = raw_input("What is your name? ")
shonda = str("shonda")
if name = shonda:
print("step this way.")
else:
("Sorry we don't have anyone else under that name.")

It says it's wrong I've been trying all weekend and I have no idea what to do.
It says it's wrong
Please elaborate on this, what is the actual message.
a copy of the error traceback would be helpful
shonda = str("shonda")
should be
shonda = "shonda"
The quotes cause the text to be a string.
if name = shonda:
needs to be

don't forget indentation.

if name == shonda:
(Jan-29-2018, 01:11 AM)Larz60+ Wrote: [ -> ]It says it's wrong
Please elaborate on this, what is the actual message.
a copy of the error traceback would be helpful
shonda = str("shonda")
should be
shonda = "shonda"
The quotes cause the text to be a string.
if name = shonda:
needs to be

don't forget indentation.

if name == shonda:

THANKS VERY MUCH!