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 Correct the indentation.

Can somebody tell me what I am doing wrong?

Bummer! Your file has 1 error(s) on line(s) 8: no newline at end of file.

http://teamtreehouse.com/library/write-better-python/cleaner-code/indentation

def small_function():
    return True


def bigger_function():
    a = 2
    b = 4
    return a, b

2 Answers

Kenneth Love
STAFF
Kenneth Love
Treehouse Guest Teacher

It's expecting a blank line at the end of the file. Add a blank line and it should pass.

Thank you so much Kenneth.

def small_function():
      return True

def bigger_function():
       a = 2
       b = 4
       return a, b

keep getting this Bummer! Your file has 1 error(s) on line(s) 4: expected 2 blank lines, found 1. Preview any Ideas?

Kenneth Love
Kenneth Love
Treehouse Guest Teacher

Well, as the error says, there should be two blank lines. If you remember from the video, we should separate functions with two blank lines. You've only put one blank line between the functions.

Ken Alger
Ken Alger
Treehouse Teacher

Kenneth Love

I like the way your challenges check for conventions like this. Is the two spaces between functions rather standard? I have read that Google only uses one space, and am just curious what the "official" recommendation is.

Thanks for all you do,

Ken