https://github.com/mannekeenpis/fizz-buzz
💼 The FizzBuzz job interview question (Python)
https://github.com/mannekeenpis/fizz-buzz
python3
Last synced: about 1 month ago
JSON representation
💼 The FizzBuzz job interview question (Python)
- Host: GitHub
- URL: https://github.com/mannekeenpis/fizz-buzz
- Owner: mannekeenpis
- Created: 2022-02-04T10:47:05.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-20T09:40:51.000Z (about 3 years ago)
- Last Synced: 2025-03-14T14:08:32.634Z (about 2 months ago)
- Topics: python3
- Language: Python
- Homepage:
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FizzBuzz
# Instructions
You are going to write a program that automatically prints the solution to the FizzBuzz game.
> `Your program should print each number from 1 to 100 in turn.`
> `When the number is divisible by 3 then instead of printing the number it should print "Fizz".`
> `When the number is divisible by 5, then instead of printing the number it should print "Buzz".`
> `And if the number is divisible by both 3 and 5 e.g. 15 then instead of the number it should print "FizzBuzz"`
e.g. it might start off like this:
```
`1
2
Fizz
4
Buzz
Fizz
7
8
Fizz
Buzz
11
Fizz
13
14
FizzBuzz`
````.... etc.`
# Solution
[main.py](main.py)
Alternatively: [https://en.wikipedia.org/wiki/Fizz_buzz](https://en.wikipedia.org/wiki/Fizz_buzz)
# Installation on Linux and Unix like OS
* `git clone https://github.com/lenargasimov/fizz-buzz.git`
* `cd fizz-buzz`
* `python3 main.py`# Instalation on Windows
* `git clone https://github.com/lenargasimov/fizz-buzz.git`
* `cd fizz-buzz`
* `python main.py`