Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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
231,268 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
231,268 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