Re:Beads: Computer language and toolchain
by OskarS on Thursday May 27, 2021 @01:10PM
(#27305378)
I think he's saying that inside of the loop in FizzBuzz, it should look like something like this (Python-esque pseudocode, assuming for a second print() doesn't add a newline automatically):
i.e. no special "FizzBuzz" case for when it's divisible by 15, it just naturally falls out of the first two if's. It's a bit of a silly objection though, the it's fine to write it as the author did.
[ Parent
| on HN ]
Re:Beads: Computer language and toolchain
by alexeldeib on Thursday May 27, 2021 @03:58PM
(#27307491)
as I learned above you can use the "end" kwarg to avoid the newline:
print("Fizz", end="")