0 and 1 are the basic building block for any software. Share and note my experience and encounter with 0 and 1.
#!/usr/bin/python
mylist = []
for i in range(1,101):
if i%3 == 0 and i%5 == 0 :
mylist.append("FizzBuzz")
elif i%3 == 0 :
mylist.append("Fizz")
elif i%5 == 0 :
mylist.append("Buzz")
else :
mylist.append(i)
print(mylist)
No comments:
Post a Comment