FizzBuzz - LeetCode 412 - Python

preview_player
Показать описание

Explaining FizzBuzz in Python

@2:02 - Code

Music: Bensound

Lemme know if you have ANY questions or comments at alll!:)
Рекомендации по теме
Комментарии
Автор

Your method of presentation and your smile is awesome it makes simple for learn your topic❤❤❤

godpaidatall
Автор

you rock Deepti . I want more videos.

deepakjyoti
Автор

def fizz_buzz(n):

output = []

for number in range(1, n+1):

result = ''

if number % 3 == 0:
result = 'Fizz'

if number % 5 == 0:
result += 'Buzz'

if len(result) == 0:
result = str(number)

output.append(result)

return output

sachinailwar