Python Forum
Help - why is my print statement being ignored?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help - why is my print statement being ignored?
#1
Hi - I am new to Python and I am taking a beginners course that hasn't even started yet. A pre-assignment to practice is just not working. Getting frustrated and may not proceed. Can you tell me what I am missing here in the code (the print line, "I like your shoes", is being ignored.)

n=input("What is your name?")
print("Hello", n, ":)")

if n=='Amar':
    print("I like your shoes")
if n=='Brandy':
    print("You seem like a cool person")
**For Amar, I am only getting:
What is your name?
Hello Amar :)
Reply
#2
It works for me
Output:
What is your name?Amar Hello Amar :) I like your shoes
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#3
My apologies and Thank you, I will review the BBcode help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to print a statement if a user's calculated number is between two floats Bruizeh 2 2,352 Feb-10-2019, 12:21 PM
Last Post: DeaD_EyE
  How to force print statement to print on one line wlsa 4 3,503 Oct-28-2018, 09:39 PM
Last Post: wavic
  Help Formatting Print Statement (input from 3 lists) X 2 Hebruiser 11 6,203 Dec-06-2017, 04:47 PM
Last Post: gruntfutuk

Forum Jump:

User Panel Messages

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