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 (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?