Christmas Coding Fun

by James Abela (@eslweb)

Pages 2 and 3 of 12

Loading...
Loading...
Outmanoeuvre Scrooge
Loading...
Scrooge is a terrible employer! You are paid by the line of code and you need cash for Christmas gifts, so how are you going to get as much as possible? You've been asked to write one measly line saying, "Bah Humbug!". How can you do it in as many lines as possible? Every line HAS to do something, no comments. Even Scrooge knows that much about coding.

Hint: You might want to get Python to write Python!
Loading...
Loading...
Mr Abela kindly provided you with a very helpful program to countdown to the most important day of the year... His birthday! However you might want to change the date to something else such as new year.
Loading...
import datetime
MrABirthday = datetime.date(2021, 8, 14) - datetime.date.today()
MrABirthday = str(MrABirthday).split(",")
print(MrABirthday[0])