diff options
author | RossTheRoss <msattr@gmail.com> | 2019-01-18 12:37:53 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-01-18 12:37:53 -0600 |
commit | e90323289604f8c66de04817e62455c83d847041 (patch) | |
tree | 45077d74053e3f90769ea14091fda821382bd67b | |
parent | Add actual glorious FizzBuzz (diff) | |
download | homework-e90323289604f8c66de04817e62455c83d847041.tar homework-e90323289604f8c66de04817e62455c83d847041.tar.gz homework-e90323289604f8c66de04817e62455c83d847041.tar.bz2 homework-e90323289604f8c66de04817e62455c83d847041.tar.lz homework-e90323289604f8c66de04817e62455c83d847041.tar.xz homework-e90323289604f8c66de04817e62455c83d847041.tar.zst homework-e90323289604f8c66de04817e62455c83d847041.zip |
shorten code
Diffstat (limited to '')
-rw-r--r-- | help.py | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,12 +1,12 @@ # Time to make a real Fizzbuzz -for e in range (0,101): - string = '' - if e % 3 == 0: - string = string + "Fizz" - if e % 5 == 0: - string = string + "Buzz" - if e % 5 != 0 and e % 3 != 0: - print(e) +for N in range (0,101): + S = '' + if N % 3 == 0: + S = S + "Fizz" + if N % 5 == 0: + S = S + "Buzz" + if N % 3 and N % 5: + print(N) else: - print(string) + print(S)
\ No newline at end of file |