Python Forum
Im so stressed because I cant figure out what I'm doing wrong.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Im so stressed because I cant figure out what I'm doing wrong.
#1
"""
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.
Reply
#2
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:
Reply
#3
(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!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Trying to help stressed out daughter Olly66 4 2,742 Jan-26-2019, 12:43 PM
Last Post: gehrenfeld
  Cannot figure out what is wrong Korbrent 12 7,066 Dec-12-2017, 03:20 AM
Last Post: wavic

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020