Monday, 14 September 2026

Educational Games

Typing
This will be your warm-up activity when you come into class

Coding
Code Link (Object Coding) 
Code Link II (Object Coding)
Code Link III (Object Coding)

Karel (Writing Code)

Educational Games

Sunday, 1 February 2026

Code Solutions


/* This program should clean up all the balls in any size world. */
function main() {
    while (leftIsClear()) {
        cleanRow();
        comeBack();
        moveUp();
    }
    cleanRow();
    comeBack();
    
    if (leftIsBlocked()) {
        returnHome();
    }
}

/* Karel moves up to the next row.
 * Precondition: Karel is at the start of a just cleaned row.
 * Postcondition: Karel is at the start of the next row to
 * be cleaned, facing east. */
function moveUp() {
    turnLeft();
    move();
    turnRight();
}


/* This brings Karel back to the starting position on the row.
 * Precondition: Karel is at the end of the row, facing a wall.
 * Postcondition: Karel is at the start of the same row, facing
 * east.
 */
function comeBack() {
    turnAround();
    while (frontIsClear()) {
        move();
    }
    turnAround();
}

/* This cleans one row of Karel's world.
 * Precondition: Karel is in the first column, facing east
 * Postcondition: Karel is at the end of the row, facing
 * east, and all balls in the row have been picked up.
 */
function cleanRow() {
    while (frontIsClear()) {
        cleanSpot();
        move();
    }
    cleanSpot();
}

/* This picks up a tennis ball, but only if it is there. */
function cleanSpot() {
    if (ballsPresent()) {
        takeBall();
    }
}

/* This brings Karel back to the starting position, facing east.
 * Precondition: Karel is at the end of the clean up.
 * Postcondition: Karel is back to (1,1), facing east.
 */
function returnHome(){
    turnRight();
    while (frontIsClear()) {
        move();
    }
    turnLeft();
}

main();

Tuesday, 2 September 2025

Welcome To Computer Studies

Lab Expectations:
  • No food or drinks in the computer lab!!!! 
  • Attend all classes. If you are absent, it is your responsibility to make up the work (not mine). 
  • Complete all of the assignments to the best of your ability. You will not succeed in this class if you don’t do the work. 
  • Be prepared in your seat, when the second bell goes 
  • Only one person talks at a time. This includes any/all announcements. Do not be typing on the keyboard or playing with your mouse also falls under this category. 
  • Leave your area as you found it. Push in your chair, log out of the computer , the equipment should be in the condition you found it. 
  • CLOSE THE CLASSROOM DOOR!!!
  • Do not live on your cellular phone, if I notice it, I will take it away. 


Typing
This will be your warm-up activity when you come into class

Coding

This is your extension activity.  This is what you do when your daily assignment is done.
Code Link (Object Coding)