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 trialkapil gadroo
124 Pointsfunction
def StartFirst() :
print("welcome to treehouse")
what is wrong in this code
2 Answers
Umesh Ravji
42,386 PointsHi Kapil, please see the 'Markdown Cheatsheet' to see how you can format your code properly.
def StartFirst():
print("welcome to treehouse")
I'm going to assume that your code is formatted properly, and the problem here is simply the space between the () and :
William Li
Courses Plus Student 26,868 PointsI've edited the question w/ proper markdown. As you can see, the original indentation is incorrect there.
kapil gadroo
124 Pointshello Ravji Space between () and : was removed but it is still not working. what is that i am missing here. It is simple to use print function and print . why in this case it is not working Plz help
Umesh Ravji
42,386 Pointsdef StartFirst():
print("welcome to treehouse")
StartFirst()
You also need the indentation (indentation is really important in python), as William pointed out in another comment. Also, make sure you are calling the function if you aren't.
Joe Gamal
Python Web Development Techdegree Student 68 PointsYou must indent your code so,
def start_first(): print("Welcome")
you see my print() method indented inside the function :)
Joshua Maggwa
199 PointsJoshua Maggwa
199 PointsThe "print" isn't indented like it's supposed to be