Skip to content

3DaysOfSwift/FizzBuzz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

3 Days of Swift Β© 2026 3DaysOfSwift.com. All rights reserved.

This Repository

This repository contains FizzBuzz. A classic interview question.

TDD FizzBuzz

Task: The FizzBuzz algorithm.

Difficulty level: Beginner.

Description: A common coding challenge is known as the "BuzzFizz" algorithm, which asks developers to loop through a series of numbers printing each number as a String. However, when the number can be divided by three the word "Fizz" should be printed. When the number is divisible by five the word "Buzz" should be printed. When the number is divisible by both three and five the word "FizzBuzz" is printed.

Things to think about: Get a working solution together first. Afterwards think about the efficiency of your solution and alter the code to make fewer duplicated calculations.

Unit tests: Write unit tests first. They provide immediate feedback for each function you create helping you to know if your code works and matches the expected behaviour.

Instructions: Create a new project or Xcode playgound and write the buzz fizz algorithm. If you want to be professional you can write unit tests.


Download this Xcode project at 3DaysOfSwift.com.


Official Swift Documentation

Apple created The Swift Programming Language (TSPL) book to discuss and describe the following language features.

  1. The Basics
  2. Basic Operators
  3. Strings and Characters
  4. Collection Types
  5. Control Flow
  6. Functions
  7. Closures
  8. Enumerations
  9. Structures and Classes
  10. Properties
  11. Methods
  12. Subscripts
  13. Inheritance
  14. Initialization
  15. Deinitialization
  16. Optional Chaining
  17. Error Handling
  18. Concurrency
  19. Macros
  20. Type Casting
  21. Nested Types
  22. Extensions
  23. Protocols
  24. Generics
  25. Opaque Types
  26. Automatic Reference Counting
  27. Memory Safety
  28. Access Control
  29. Advanced Operators

Read our Xcode playground conversion only at 3DaysOfSwift.com


3 Days of Swift

Website | Subreddit Community

Β© 2026 3DaysOfSwift.com. All rights reserved.

Built for professional iOS developers.

πŸ‘©πŸΏβ€πŸ’»πŸ§‘πŸ»β€πŸ’»πŸ™‹πŸΏβ€β™€οΈπŸ§‘πŸΌβ€πŸ’»πŸ‘©πŸΌβ€πŸ’ΌπŸ‘©πŸ½β€πŸ’»πŸ§‘πŸΏβ€πŸ’»πŸ’πŸΌβ€β™€οΈπŸ‘©πŸΌβ€πŸ’»πŸ‘¨πŸΌβ€πŸ’»πŸ‘¨πŸ½β€πŸ’»πŸ™‹πŸ½β€β™‚οΈπŸ‘©πŸ»β€πŸ’»πŸ§‘πŸΎβ€πŸ’»πŸ‘©πŸ»β€πŸ’»πŸ‘©πŸΎβ€πŸ’»πŸ‘¨πŸΌβ€πŸ’»πŸ™‹πŸ»β€β™‚οΈπŸ‘¨πŸΏβ€πŸ’»πŸ™‹πŸΌβ€β™‚οΈ

About

A classic interview question. This Xcode project will provide the algorithm for the FizzBuzz coding challenge with unit tests to ensure it functions as intended.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages