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) Logic in Python Fully Functional

Can you tell me why my script doesn't run?

I created a new file and called it functions.py then wrote this:

def hows_my_parrots(): print("He is okay")

hows_my_parrots()


Console

treehouse: ~/workspace$ python functions.py treehouse: ~/workspace$

When I ran the script in the console, nothing appeared. I'm expecting to get "He is okay" just like in the example for the video.

I'm using Chrome for my browser.

1 Answer

Manish Giri
Manish Giri
16,266 Points

Your code needs to be indented properly -

def hows_my_parrots(): 
    print("He is okay")

hows_my_parrots()