More Fizzbuzz With Python - #21

preview_player
Показать описание
Continuing to show you how to create Fizzbuzz with Python. In this video I'll continue where the last video left off. If you didn't see it, check the Python playlist below.

FizzBuzz used to be a popular interview question. In this video we'll extend our fizzbuzz to keep
track of how many times we saw fizz, buzz, and fizzbuzz and then we'll create a little report.

In this series I'll teach you to program with Python in 2019.
See My Python Playlist:

Subscribe to channel:

Рекомендации по теме
Комментарии
Автор

we can do with 1 less if
ctr = 1
while (ctr <= 100):
msg = ""
if (ctr % 3 == 0):
msg += "Fizz"
if (ctr % 5 == 0):
msg += "Buzz"
print(str(ctr)+" - "+msg)
ctr += 1

mohinderlamba
Автор

Is there another way to do the {:, }? bcz Im using the print( f ' {num} ' ) from the new python version

filipesantos