On Fri, 22 Apr 2022 at 03:02, Tola Oj <ojomooluwatolami...@gmail.com> wrote:
>
> for i in range(1, n+1):
>         if i % 3 == 0 and i % 5 == 0:
>             print("Fizzbuzz")
>         elif i % 3 == 0:
>             print("Fizz")
>         elif i % 5 == 0:
>             print("Buzz")
>         else:
>             print(i)
>     print(i, sep='\n')
>
> fizzbuzz(13)

This can't be your complete code, because it won't run like this. Have
a very careful read through of your code, and consider adding some
extra print statements to see what's happening; but if you're asking
for help, you'll definitely need to post the entire program.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to