From e90323289604f8c66de04817e62455c83d847041 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Fri, 18 Jan 2019 12:37:53 -0600 Subject: shorten code --- help.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'help.py') diff --git a/help.py b/help.py index 11f03bd..2fef459 100644 --- a/help.py +++ b/help.py @@ -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 -- cgit v1.2.3