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 (2015) Python for Beginners Call a function

Ping-chien chen
Ping-chien chen
173 Points

can i have the answer of this answer?I can't figure it out myself

What's the answer of this question? What is "def"? def my_funtion_name(): print("hello, treehouse")

is that correct?

function.py
my_function_name():
  'print("hellow,treehouse")'

3 Answers

You made it harder than it was supposed to be. They didn't want you to write a function. They just wanted you to use the print function to print a String:

print("Hello, Treehouse")
Ping-chien chen
Ping-chien chen
173 Points

I directly copy your answer, it still not work.....

Not sure what you did, but I just copied it and pasted it into the challenge and the editor accepted it.

Here's the challenge that I tried:

Challenge Task 1 of 1

Let's try something else! Again, you haven't done this yet, but you've seen it already. I need you to print something out for me.
Use the print() function to print the string "Hello, Treehouse".

Here's the code:

print("Hello, Treehouse")

I suggest you try again.