Question: 7 . 1 4 Homework 2 , Question 1 Write a script that reads in two integers from the user, then prints all the numbers

7.14 Homework 2, Question 1
Write a script that reads in two integers from the user, then prints all the numbers from 1 to 20, with the following exceptions: If a number is
divisible by:
the first entered integer, print "FIZZ" instead of the number.
the second entered integer, print "BUZZ" instead of the number.
both the first AND the second integers, print "FIZZBUZZ" instead of the number.
For example, if the inputs are 3 and 5, the output should be
12 FIZZ 4 BUZZ FIZZ 78 FIZZ BUZZ 11 FIZZ 1314 FIZZBUZZ 1617 FIZZ 19 BUZZ
Note that each item is separated by a single space character and that the expected output has a trailing space followed by a newline
character.
556802.4189854. qx3zqy7
LAB
ACTIVITY
7.14.1: Homework 2, Question 1
main.py
1
'' Your code '
7 . 1 4 Homework 2 , Question 1 Write a script

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 Programming Questions!