CSCI E-1a

Programming

by Spencer Tiberi

Introduction

Software

Finding Mike Smith

Phonebook Algorithm

1 pick up phone book
2 open to middle of phone book
3 look at names
4 if Smith is among names
5     call Mike
6 else if Smith is earlier in book
7     open to middle of left half of book
8     go back to step 3
9 else if Smith is later in book
10    open to middle of right half of book
11    go back to step 3
12 else
13    quit

Pseudocode

Programming Constructs

C

#include <stdio.h>

int main(void)
{
    printf("hello, world/n");
}

C++

#include <iostream>

int main()
{
  std::out << "hello, world" << std::endl;
}

Python

print("hello, world")

Other Programming Language

Introducing Scratch

hello, world in Scratch

hello, world in Scratch

Scratch Function

Scratch Forever Loop

Scratch Repeat Loop

Scratch If Else

Scratch Interface

Scratch Interface

Scratch Connect

Sounds

Scratch Sounds

Loops

Animation

Scratch Move 1

Scratch Move 2

Scratch Move 3

Breaking Down Problems

pet the cat

Pet the Cat

don’t pet the cat

Don't Pet the Cat

counting sheep

Counting Sheep

cough0

cough0

cough1

cough1

cough2

cough2-1

Threads

Threads

Events

Events 1

Events 2

Puppets

Closing Thoughts

It’s Raining Men