-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfizz_buzz.exem
52 lines (39 loc) · 894 Bytes
/
fizz_buzz.exem
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
"""
Assertions name variables and provide the reasons for the action shown in their examples.
"""
<15
i1 % 3 == 0 and i1 % 5 == 0 # This is why the below should be returned.
>FizzBuzz
<1 # 1 doesn't make any of our IF conditions true, so instead it will make
True # only an ELSE true.
>1 # In these cases, return the input.
<2 # Ditto.
True
>2
<3 # 3 makes
i1 % 3 == 0 # this condition true, and so
>Fizz # this is returned.
<4 # Alternatively, this, like 1 and 2, make none of our IF conditions true,
True # so it passes down an ELSE path that
>4 # returns the input.
<5 # 5 makes
i1 % 5 == 0 # this condition true, and so
>Buzz # this is returned.
<6
i1 % 3 == 0
>Fizz
<7
True
>7
<8
>8
<9
>Fizz
<10
i1 % 5 == 0
>Buzz
<15
>FizzBuzz
<30
i1 % 3 == 0 and i1 % 5 == 0
>FizzBuzz