Giter Club home page Giter Club logo

fizzbuzz's Introduction

FizzBuzz

Business Requirement



You are a PE teacher.Five minutes before your class is dismissed, you decides to play a game with all students at your class. The rule is as below:

  1. Let all the students stand in one line and everyone counts off in order.
  2. During counting off, if the number is the multiples of the first special number, number three (3), then the student should say Fizz; if the number is the multiples of the second special number, number five (5), say Buzz; if the multiples of the third special number, number seven (7), say Whizz.
  3. During counting off, if the number is the multiples of two special numbers, eg. the first and second numbers, then a student should say FizzBuzz instead of this number, so on and so forth. If the number is the multiples of three special numbers, say FizzBuzzWhizz.

Now you need to design a program to simulate this game. The output should be output fragments:

1
2
Fizz
4
Buzz
Fizz
Whizz
8
Fizz
Buzz
11
Fizz 
13
Whizz
FizzBuzz
16
17
Fizz
19
Buzz 
… 
FizzBuzz

You only need to realize the fizzBuzz functions inside by means of TDD.

Instructions

  • Fork this project into your own repository;
  • Clone it to your local computer;
  • Fork the codes of the technology stack in your repository;
  • Submit your homework on github and send the github url back to the system

Notes on existing codes

Existing codes will help explain how to use tests. You will find two tests under HelloWorldTest. The first shows how to conduct integration tests and use Assert. The second shows how to do mock.

fizzbuzz's People

Contributors

jcltw 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.