Monday 12 September 2016

Robozzle

Welcome to a short exercise designed to teach you some basic programming concepts.
The point of the exercise is to show you how program code can be seen as a set of instructions, and show you some conventions like; loops, conditional logic, and subroutines
To do this we're going to use 'Robozzle'. It's a free web based programming game where you give a robot a set of instructions.
All up the exercise should take about 1-1.5 hrs.

Here's what to do...

Get set up

Grab a PC or phone (Android or iOS apps are available. Search 'Robozzle')
Pair up with someone.
Work through the puzzles in order, and utilise pair programming (one person use the mouse and keyboard, the other person talk - and then swap).
If you get stuck, feel free to ask for help!


Part 1: Introduction to Robozzle

  1. Tutorials
    1. Tutorial 1
    2. Tutorial 2
    3. Tutorial 3
    4. Tutorial 4
  2. Basic loop
    1. Stairs
      (make sure you keep this open once you solve it, you'll need it on the next page)

Part 2: Introduction to Psuedo Code

Psuedo Code is a notation resembling a simplified programming language, used in program design.
We're going to write some basic psuedo code to illustrate the instructions which we're giving the robot.

Log on to Trello
Visit our 'Robozle Psuedo Code (master)' trello board

This has been prepopulated with some psuedo-code statements
In the right hand menu in trello, choose '... More', then 'Copy Board' - this will make a copy of the board on your trello account.
  1. Using the statements; translate the solution you had for 'Stairs' (above) in to a psuedo code stack. 
  2. Move on to the Iteration Puzzle
    1. Using the board from above, build your solution with psuedo code FIRST
    2. Then, translate it in to Robozzle instructions. 
Question: What psuedo code instructions are missing? 

Extension if you're feeling up to itVisit our ''Robozle Psuedo Code (master)' trello board
This has been prepopulated with some more code-centric psuedo-code statements
In the right hand menu in trello, choose '... More', then 'Copy Board' - this will make a copy of the board on your trello account.


Part 3: More puzzles

Work through these puzzles.
If you get stuck, look at the Robozzle instructions like they're psuedo code. Walk through what you're telling the robot to do, and see where it might be going wrong.
  1. Nested subroutines
    1. Simple spiral
    2. Function calls
  2. Conditionals
    1. "First puzzle"
    2. "Very easy"
    3. "Don't fail"
  3. Conditional subroutine
    1. "Right on red"

Conclusion

You should have an understanding of program code as a set of instructions which is executed, and understand how things like loops, subroutines, and conditionals can be used to enhance instructions to increase efficiency, and expand logic.
Robozzle is a free to use game that you can play with in your spare time.
As well as web app versions, there are native apps for androis and iOS 

No comments:

Post a Comment