Question: I am trying to solve the FizzBuzz problem where we print FizzBuzz if the integer is divisible by 3 and 5, Fizz if divisible by

I am trying to solve the FizzBuzz problem where we print FizzBuzz if the integer is divisible by 3 and 5, Fizz if divisible by 3 and Buzz if divisible by 5

I have the following code that I dont need help in understanding. Can someone walk me through the code? why do we only test for 3 and 5 separately and not if divisible by both 3 and 5? also what is c3 and c5? and what is d=""?

I am trying to solve the FizzBuzz problem where we print FizzBuzz

\# code c3=0 c5=0 d=" for i in range (1,101) : c3+=1 c5+=1 if (c3==3) : d+= "fizz" c3=0 if (c5==5) : d+= "buzz" c5=0 if (d==" " ) : print(i) else: d=

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!