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

Terrell Phinazee
Terrell Phinazee
1,675 Points

Can someone please help me with this code. I'm a complete beginner.

Could someone please show me what's wrong with my print function?

function.py
print("Terrell")
konstantinknull
konstantinknull
1,811 Points

You have to write either:

print("Terrell") ---> Within brackets and double quotes

Or

print "Terrell" ---> Without brackets, in double quotes

Hopefully I haven't done any mistake in my description ;-) Cheers K.

2 Answers

Paul Cox
Paul Cox
12,671 Points

There's nothing wrong with your print function but if you want to pass the challenge you'll have to print out the string that it asks you to :).

If you want to print the name "Terrell," then either

print "Terrell" or print("Terrell")

will work. If you want to print the contents of a variable named Terrell, then leave out the quotes and use either

print Terrell or print(Terrell)

What you've got should work fine. What error are you getting?