Home
Here’s a listing of all my posts, with links and a preview of code:
R code
# Is there a line below this?
<- function(fbnums = 1:50) {
fizz_buzz <- dplyr::case_when(
output %% 15 == 0 ~ "FizzBuzz",
fbnums %% 3 == 0 ~ "Fizz",
fbnums %% 5 == 0 ~ "Buzz",
fbnums TRUE ~ as.character(fbnums)
)print(output)
}# Is there a line above this?
Python code
def fizz_buzz(num):
if num % 15 == 0:
print("FizzBuzz")
elif num % 5 == 0:
print("Buzz")
elif num % 3 == 0:
print("Fizz")
else:
print(num)
No matching items