101 Computational Problems #4 Fizz Buzz (Python)

preview_player
Показать описание
#python #problemsolving #fizzbuzz

Delyth the duck solves FizzBuzz with Python.

Taken from my upcoming book "101 Computational Problems" designed for recreational coding and to be used in class as computer science problems.

For this problem, I am using Python / JupyterLabs, but any flavour of Python will work.

From the book:

Delyth Duck is going to a job interview. She has been asked to prepare some code that solves the FizzBuzz problem.

FizzBuzz is a counting game where numbers divisible by three are replaced by "Fizz", numbers divisible by five are replaced with "Buzz" and numbers divisible by both three and five are replaced by "FizzBuzz".

Write a program that counts from 1 to 100 and displays either the number or Fizz, Buzz or FizzBuzz as appropriate.

For example:
- 1,2,Fizz,4, Buzz....

Delyth’s challenge in the interviewis to write code using no more than 2 conditional tests?

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

Cara meu deus tábom 😮😮😮😮😮😮😮😮😮😮😮😮😮que matemática e essa

mariasilva-bteb