Saturday 18 July 2015

CS50 - So it begins

So, today I started watching the lectures etc. for This Is CS50 2014 via iTunes U. Each week there are problems to work through, and I figured it would be a good idea to put down my thoughts since there's no real accountability other than to myself.

This week's questions:
How do you represent the integer 50 in binary?


  • 110010

How many bits must be "flipped" (i.e., changed from 0 to 1 or 1 to 0) in order to capitalise a lowercase a that's represented in ASCII?


  • Well uppercase 'A' is 65 in ASCII = 1000001
  • Lowercase 'a' is 97 in ASCII     = 1100001
  • So only 1 bit must be flipped to change case. 

How do you represent the integer 50 in, oh, "hexidecimal," otherwise known as "base-16"?


  • Base 16 would go: | 4096 | 256 | 16 | 1 |
  • So you'd need 3x16 =48 PLUS 2x1=2 to make 50
  • So it would look like: 0302 (assuming each column made up of 2 digits to represent one state)

Finally, there is a practical task to complete: Your mission is, quite simply, to have fun with Scratch and implement a project of your choice (be it an animation, a game, interactive art, or anything else), subject only to the following requirements:

  • Your project must have at least two sprites, at least one of which must resemble something other than a cat.
    • Mine uses four: a penguin, a snowflake, a lightning bolt, and a Game Over sign.
  • Your project must have at least three scripts total (i.e., not necessarily three per sprite).
    • Apparently in total I've used 22 scripts :P Some are repeats though. 
  • Your project must use at least one condition, one loop, and one variable.
    • Check - I used the if/else condition several times, the forever loop, and the score variable.
  • Your project must use at least one sound.
    • Check - I used pop, bells, and duck quack 
  • Your project should be more complex than most of those demonstrated in lecture (many of which, though instructive, were quite short) but it can be less complex than, say, Pikachu’s Pastry Catch and Ivy’s Hardest Game. As such, your project should probably use a few dozen puzzle pieces overall.
    • Although not the most complex of games, I think it's more than what was demonstrated. It's certainly taken me a while to work out! I did look at the scripts of others to see how they worked, but didn't directly copy anything. Much, much fun though :)
You can play my game, Penguin Popper, by clicking on the picture below:

No comments:

Post a Comment