Git Product home page Git Product logo

fizzbuzz-kata's Introduction

FizzBuzz Kata

Zasady

Gracze liczą po kolei: 1, 2... Ale gdy liczba jest podzielna przez 3, zamiast tej liczby należy powiedzieć "Fizz". Natomiast gdy liczba jest podzielna przez 5 trzeba powiedzieć "Buzz". Gdy liczba jest podzielna zarówno przez 3 jak i przez 5, trzeba powiedzieć "FizzBuzz".

  1. Utwórz funkcję, która przyjmuje liczbę naturalną większą od 0 i zwraca dla niej reprezentację, będący odpowiedzią w grze Fizz Buzz.
  2. Utwórz program, który wypisuje na konsolę odpowiedzi dla liczb od 1 do 100 oddzielone przecinkami.

Dodatkowe opcjonalne wymagania:

  1. Fizz odpowiadamy również wtedy, gdy liczba zawiera cyfrę 3.
  2. Podobnie dla Buzz - także gdy liczba zawiera cyfrę 5.
  3. Od teraz Fizz i Buzz mówimy dla podzielności przez/zawierania cyfr 7 i 9.

Rules

For multiples of 3 return "Fizz" instead of the number For the multiples of 5 return "Buzz" instead of the number For numbers which are multiples of both 3 and 5 return "FizzBuzz" instead of the number

  1. Write a function that takes one number (larger than 0) and return its representation in FizzBuzz game
  2. Write a program that prints on console answers for numbers from 1 to 100, comma separated

Optional requirements:

  1. "Fizz" returned also when number contains digit 3
  2. "Buzz" returned also when number contains digit 5.
  3. "Fizz" and "Buzz" when number is multiple or contains digit: 7 i 9.

fizzbuzz-kata's People

Contributors

michal-lipski avatar apierzch avatar krzysztof-jelski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.