Question: The first program simulates the word game fizzBuzz . The task is to create a function fizzBuzz that takes in three arguments - N (the

The first program simulates the word game fizzBuzz. The task is to create a function fizzBuzz that takes in three arguments - N (the number we are going to count upto), divisor_1 (the first divisor) and divisor_2 ( the second divisor). The function would check if all numbers starting from 1 to N are divisible by both the divisors. The function returns no value. For your output-

1. If the number is divisible the divisor_1 print Fizz.

2. If the number is divisible by the divisor_2 print Buzz

3. If the number is divisible by both the first and the second divisor, print FizzBuzz

4. For everything else, print the number itself.

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!