We are doing Java, though, if slowly. We were at a bit of a slack point the other day, so I asked the other students if they fancied a code puzzle. I mostly got blank looks, but Ricardo, Dipendra and Richard were game. Basically, the code has to output a pattern of "#"'s, like this:
#####
####
###
##
#
but the limitations are that you can only use two print statements, one for the "#" and one for the CRLF. You can use any other code you like. Richard got it within about ten minutes or so, while the others eventually gave up. To up the ante, I asked Richard to produce this:
###
####
#####
####
###
He went very quiet for a long while!
I have done quite a few shifts at the shop, notably today, where I listened to the Morcheeba album Big Calm:
No comments:
Post a Comment