Skip to content

Latest commit

 

History

History
 
 

15-Looping-With-FizzBuzz

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
tutorial

15 Looping With FizzBuzz

This is a typical beginner test that is required to complete interviews at Google, Facebook and all the other big tech companies.

📝 Instructions:

  1. Write the code needed to print in the console all the numbers from 1 to 100.

  2. For multiples of 3, instead of the number, print "Fizz".

  3. For multiples of 5, print "Buzz".

  4. For numbers that are multiples of both 3 and 5, print "FizzBuzz".

💻 Expected result:

1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz
16
....
....
98
Fizz
Buzz

🔎 Important:

There's a series of exercises dedicated to Lists and Loops, we encourage you to go and finish them before continuing: https://github.com/4GeeksAcademy/python-lists-loops-programming-exercises

Then, come back! 😊

💡 Hint:

  • You have to use multiple if statements.

  • Think about the correct order of the different if statements to make the code do what you want.