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 Comparison Solution

Faisal Rana
seal-mask
.a{fill-rule:evenodd;}techdegree
Faisal Rana
Python Web Development Techdegree Student 2,008 Points

How if statement sequence works ?

Why ken didn't start with is_fuzz statement or is_buzz statement separately when working with if statement ? Why he didn't drop down them to else or elif statement ? Please elaborate

1 Answer

He checks divisible by 3 and 5 first so that a number like 15 isn't wrongly detected as just fizz or buzz.