Created
October 29, 2021 17:39
-
-
Save mnp/09db129ceb37311042db9443d35b2f0d to your computer and use it in GitHub Desktop.
No-div fizzbuzz
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i=0 | |
j=3 | |
k=5 | |
while i<40: | |
if j==0 and k==0: | |
print(f'{i} fizzbuzz') | |
j=2 | |
k=4 | |
elif j==0: | |
print(f'{i} fizz') | |
j=2 | |
k = k - 1 | |
elif k==0: | |
print(f'{i} buzz') | |
k=4 | |
j = j - 1 | |
else: | |
print(f'{i}') | |
j = j - 1 | |
k = k - 1 | |
i = i + 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment