Python Forum

Full Version: Running input() from mac terminal
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all -
Total newbie question here...just getting started.
I'm running Python3 3.8.3.

Wondering what I'm doing wrong here.

Here's my code...

prompt = "Please enter your name"
prompt += "\nName: "

name = input(prompt)

print("Hello, {name}!")

When I run on my mac terminal, I get this output... my name isn't showing up... "{name}" does.

JonathaettsMBP2:python_work jdhamblett$ python3 greeter
Please enter your name
Name: Jonathan
Hello, {name}!

Apologies if this has been asked a million times.
Thanks so much for the assistance.
  • Please use proper tags while coding - see BBCode to know more
  • Your print statement should be
    print(f"Hello, {name}!")
(Jun-15-2020, 04:07 PM)pyzyx3qwerty Wrote: [ -> ]
  • Please use proper tags while coding - see BBCode to know more
  • Your print statement should be
    print(f"Hello, {name}!")

Ugh - thank you... I'm an idiot. Appreciate your help!