Compare commits
3 Commits
a2e4833c6f
...
5026f9cd45
Author | SHA1 | Date | |
---|---|---|---|
5026f9cd45 | |||
99731bbf4e | |||
0075ab0646 |
4
Makefile
4
Makefile
@ -8,8 +8,8 @@ build:
|
|||||||
|
|
||||||
start: build
|
start: build
|
||||||
docker run -dit --rm \
|
docker run -dit --rm \
|
||||||
--name webserver \
|
--name webserver \
|
||||||
-p 8080:80 \
|
-p 8080:80 \
|
||||||
-v $(shell pwd)/public_html:/usr/local/apache2/htdocs \
|
-v $(shell pwd)/public_html:/usr/local/apache2/htdocs \
|
||||||
apache2
|
apache2
|
||||||
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
stop = int(1E4)
|
|
||||||
triggers = [3, 5]
|
|
||||||
printout = ['fizz', 'buzz']
|
|
||||||
|
|
||||||
def isNumberDivisibleBy(num:int, div:int, msg:str) -> str:
|
|
||||||
if num % div == 0: return msg
|
|
||||||
return ""
|
|
||||||
|
|
||||||
output = ""
|
|
||||||
for index in range(1, 1+stop):
|
|
||||||
tmp = ""
|
|
||||||
for div, out in zip(triggers, printout):
|
|
||||||
tmp += isNumberDivisibleBy(index, div, out)
|
|
||||||
|
|
||||||
if len(tmp) == 0: tmp = str(index)
|
|
||||||
|
|
||||||
output += tmp + "\n"
|
|
||||||
|
|
||||||
print(output)
|
|
Loading…
Reference in New Issue
Block a user