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 Write Better Python Cleaner Code Operator Spacing

task1 of 1 Fix the spacing around commas, operators, and in function calls

Fix the spacing around commas, operators, and in function calls

starter.py
numbers = [1, 2, 3, 4, 5]


def add(num1, num2):
    return num1 + num2


def subtract(num1, num2):
    return num1 - num2


def mathy(num1, num2):
    up = add(5 + 7, 7 + 9)
    down = subtract(6, 3)
    return add(up, down)

3 Answers

Chase Marchione
Chase Marchione
155,055 Points

Hi there,

To pass the objective, you need to include a blank line (in this case, it will be line 16) at the end of the file. Make sure that the line is truly empty (has no whitespace--no content on the line, you'll just be able to see the line number, which will be 16), and you will have followed the proper convention of having a newline at the end of your file, and pass the objective.

Hope this helps!

To get ride white space you space to last line make sure you our at say end after your last answer is line 16 on the VERY first space on line 16 hit the delete key over and over again and then check work

I hope this help , took several hours to figure this out never saw this in the video at all, I believe just assumption (I guess) Can't wait to finish this course.

did it work? =)

Yes it surely did work Thanks CJ