A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Fizz Buzz in Pyret page! Here, you'll find the source code for this program as well as a description of how the program works.
fun fizzbuzz(n :: Number):
when n > 0 block:
fizzbuzz(n - 1)
var result = ""
when num-modulo(n, 3) == 0:
result := string-append(result, "Fizz")
end
when num-modulo(n, 5) == 0:
result := string-append(result, "Buzz")
end
when string-equal(result, ""):
result := tostring(n)
end
print(string-append(result, "\n"))
end
end
fizzbuzz(100)
Fizz Buzz in Pyret was written by:
If you see anything you'd like to change or update, please consider contributing.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.