Skip to content
This repository has been archived by the owner on May 5, 2021. It is now read-only.

Create fizzbuzz exercise #100

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions woodsl2/fizzbuzz exercise
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#Lawrence Woods
# coding=utf-8
# This program pints the numbers between 1 to 100 inclusive.
# But for multiples of three the program prints “Fizz”
# instead of the number. For the multiples of five the program
# prints “Buzz”. For numbers which are multiples of both three and
# five the program prints print “FizzBuzz” instead.


fizzbuzz = []

start = int(input("Enter Start Value"))
end = int(input("Enter End Value"))

for i in range(start, end + 1):
entry = ''
if i % 3 == 0:
entry += "fizz"
if i % 5 == 0:
entry += "buzz"
if i % 3 != 0 and i % 5 != 0:
entry = i

fizzbuzz.append(entry)

for i in fizzbuzz:
print(i)