Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Python Python Basics Meet Python Variables

FABIAN TRUJILLO
FABIAN TRUJILLO
878 Points

need help, please.

this is how i have my text 1 first_name="Ada" 2 print('first_name')

3 print("Hello, Fabian") 4 print("Fabian is learning Python") and when i run it on the console using the file name this is what shows "bash: helly.py: command not found" can anyone tell me why? and yes i did remember to save the file anytime i make cahnges.

josefm
josefm
612 Points

hey!

you have to type "python helly.py" into your bash. If vou want to print your first name you also have to wrap your variable into () without your quotes like this:

first_name = "Ada"

print(first_name)
print("Hello, Fabian")
print("Fabian is learning Python")

2 Answers

Steven Parker
Steven Parker
210,872 Points

Is your file actually named "helly.py" or is that a typo? (a more typical name would be "hello.py")

And don't put variable names inside quotes. Quotes are for literal strings. So in this case, it will print out "first_name" instead of "Ada".

FABIAN TRUJILLO
FABIAN TRUJILLO
878 Points

Sorry that was a typo it actually is hello.py and thank you I’ll do just that and hopefully it works.

Steven Parker
Steven Parker
210,872 Points

FABIAN TRUJILLO — Glad to help. You can mark a question solved by choosing a "best answer".
And happy coding!

FABIAN TRUJILLO
FABIAN TRUJILLO
878 Points

Thank you I tired this and it worked thank you for getting back to me