This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// enums3.rs | |
// Address all the TODOs to make the tests pass! | |
enum Message { | |
Move(Point), | |
Echo(String), | |
ChangeColor((u8,u8,u8)), | |
Quit, | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# One-line FizzBuzz in Python 3 (for my son, who asked me to show him it was possible) | |
print("\n".join(["Fizz"*(n%3 == 0) + "Buzz"*(n%5 == 0) or str(n) for n in range(1, 15+1)])) |
OlderNewer