Skip to content

Commit 7ef2235

Browse files
Ticiana de AndradeTiciana de Andrade
authored andcommitted
Add README and Fizz-Buzz from 19/04/18
1 parent 38f97fd commit 7ef2235

File tree

6 files changed

+419
-0
lines changed

6 files changed

+419
-0
lines changed

2018/19-04-18/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
* **Format:** Mob Programming
2+
* **Katas:** Berlin Clock Kata and Fizz Buzz Kata
3+
* **Where:** Quantium
4+
* **When:** 19/04/2018
5+

2018/19-04-18/fizz-buzz/.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

2018/19-04-18/fizz-buzz/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Fizz Buzz
2+
3+
## Problem Description
4+
5+
Imagine the scene. You are eleven years old, and in the five minutes before the end of the lesson, your Maths teacher decides he should make his class more “fun” by introducing a “game”. He explains that he is going to point at each pupil in turn and ask them to say the next number in sequence, starting from one. The “fun” part is that if the number is divisible by three, you instead say “Fizz” and if it is divisible by five you say “Buzz”. So now your maths teacher is pointing at all of your classmates in turn, and they happily shout “one!”, “two!”, “Fizz!”, “four!”, “Buzz!”… until he very deliberately points at you, fixing you with a steely gaze… time stands still, your mouth dries up, your palms become sweatier and sweatier until you finally manage to croak “Fizz!”. Doom is avoided, and the pointing finger moves on.
6+
7+
So of course in order to avoid embarassment infront of your whole class, you have to get the full list printed out so you know what to say. Your class has about 33 pupils and he might go round three times before the bell rings for breaktime. Next maths lesson is on Thursday. Get coding!
8+
9+
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz “.
10+
11+
Sample output:
12+
13+
```
14+
1
15+
2
16+
Fizz
17+
4
18+
Buzz
19+
Fizz
20+
7
21+
8
22+
Fizz
23+
Buzz
24+
11
25+
Fizz
26+
13
27+
14
28+
FizzBuzz
29+
16
30+
17
31+
Fizz
32+
19
33+
Buzz
34+
... etc up to 100
35+
```
36+
37+
Stage 2 - new requirements
38+
39+
```
40+
* A number is fizz if it is divisible by 3 or if it has a 3 in it
41+
* A number is buzz if it is divisible by 5 or if it has a 5 in it
42+
```
43+
44+
From: http://codingdojo.org/kata/FizzBuzz/

2018/19-04-18/fizz-buzz/package-lock.json

Lines changed: 272 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"name": "fizz-buzz",
3+
"scripts": {
4+
"test": "mocha -w"
5+
},
6+
"devDependencies": {
7+
"mocha": "3.2.0"
8+
}
9+
}

0 commit comments

Comments
 (0)