kids computer-programming
DESCRIPTION
The very first introduction.TRANSCRIPT
![Page 1: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/1.jpg)
Computer Programming
Ed Burns, Oracle Corporation
![Page 2: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/2.jpg)
Copyright 2012 Ed Burns, Creative Commons License 2
Computer ProgrammingWhat is a program?
A computer program is a file, just like a document in Microsoft Word or a picture in KidPix.
![Page 3: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/3.jpg)
Copyright 2012 Ed Burns, Creative Commons License 3
With Microsoft Word or KidPix you use the computer to create text or images to be read or viewed by humans.
+ =
+ =
Computer ProgrammingWhat is a program?
![Page 4: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/4.jpg)
Copyright 2012 Ed Burns, Creative Commons License 4
With a computer program, you use the computer to create instructions to be read by a computer!
+ =
Computer ProgrammingWhat is a program?
![Page 5: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/5.jpg)
Copyright 2012 Ed Burns, Creative Commons License 5
The instructions that make up a computer program can be really simple.
+ =
Computer ProgrammingWhat are instructions?
![Page 6: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/6.jpg)
Copyright 2012 Ed Burns, Creative Commons License 6
The instructions that make up a computer program can be really simple...
print “Hello world!”
+ =
Computer ProgrammingWhat are instructions?
![Page 7: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/7.jpg)
Copyright 2012 Ed Burns, Creative Commons License 7
...or very complex.
launch “space shuttle”
+ =
Computer ProgrammingWhat are instructions?
![Page 8: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/8.jpg)
Copyright 2012 Ed Burns, Creative Commons License 8
...or very complex.Instructions are also called statements.
+ =
Computer ProgrammingWhat are instructions?
![Page 9: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/9.jpg)
Copyright 2012 Ed Burns, Creative Commons License 9
Since the beginning of humanity, there have only ever been five different ways that humans can store and transmit knowledge!
Computer ProgrammingWhy are programs special?
![Page 10: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/10.jpg)
Copyright 2012 Ed Burns, Creative Commons License 10
BrainsFrom the beginningof humans
Computer ProgrammingWhy are programs special?
![Page 11: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/11.jpg)
Copyright 2012 Ed Burns, Creative Commons License 11
ToolsScientists say3.5 million years ago
Computer ProgrammingWhy are programs special?
![Page 12: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/12.jpg)
Copyright 2012 Ed Burns, Creative Commons License 12
Books600 years ago
Computer ProgrammingWhy are programs special?
![Page 13: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/13.jpg)
Copyright 2012 Ed Burns, Creative Commons License 13
Recorded sound and images152 years ago
Computer ProgrammingWhy are programs special?
![Page 14: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/14.jpg)
Copyright 2012 Ed Burns, Creative Commons License 14
Computer programs68 years ago
Computer ProgrammingWhy are programs special?
![Page 15: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/15.jpg)
Copyright 2012 Ed Burns, Creative Commons License 15
Because computer programs are so special, there are lots of special words to talk about them.The first special word describes what a computer does with a program.
Computer ProgrammingWhat does a program do?
![Page 16: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/16.jpg)
Copyright 2012 Ed Burns, Creative Commons License 16
Computer ProgrammingWhat does a program do?
![Page 17: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/17.jpg)
Copyright 2012 Ed Burns, Creative Commons License 17
Computer ProgrammingWhat does a program do?
It runs.What runs the program?
![Page 18: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/18.jpg)
Copyright 2012 Ed Burns, Creative Commons License 18
Computer ProgrammingWhat does a program do?
When a program runs, the computer looks at each instruction and does what the instruction says, one instruction at a time.
![Page 19: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/19.jpg)
Copyright 2012 Ed Burns, Creative Commons License 19
A person who writes a computer program is called a Programmer.You can be a programmer too!
Computer ProgrammingWho makes programs?
![Page 20: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/20.jpg)
Copyright 2012 Ed Burns, Creative Commons License 20
A person who writes a computer program is called a Programmer.You can be a programmer too!Let’s get started!
Computer ProgrammingWho makes programs?
![Page 21: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/21.jpg)
Copyright 2012 Ed Burns, Creative Commons License 21
Computer Programming
Getting Started With Programming
![Page 22: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/22.jpg)
Copyright 2012 Ed Burns, Creative Commons License 22
Five basic concepts Variables If and if else statements Lists Loops Sub-routines
Computer ProgrammingSimple instructions
![Page 23: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/23.jpg)
Copyright 2012 Ed Burns, Creative Commons License 23
variable
A place to store information so the computer can work with it
Real world example: What’s for lunch? Hot dog Hamburger
Computer ProgrammingSimple instructions
![Page 24: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/24.jpg)
Copyright 2012 Ed Burns, Creative Commons License 24
variable
A place to store information so the computer can work with it
Programming example: What’s for lunch?lunch = “Hot Dog”;lunch = “Hamburger”;
Computer ProgrammingSimple instructions
![Page 25: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/25.jpg)
Copyright 2012 Ed Burns, Creative Commons License 25
if
Make choices based on the value of a variable
Real world example:If lunch is hamburger, get ketchup. If lunch is hot dog, get mustard.
Computer ProgrammingSimple instructions
![Page 26: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/26.jpg)
Copyright 2012 Ed Burns, Creative Commons License 26
if
Make choices based on the value of a variable
Programming example:if (lunch.equals(“Hamburger”)) { getKetchup();}if (lunch.equals(“Hot Dog”)) { getMustard();}
Computer ProgrammingSimple instructions
![Page 27: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/27.jpg)
Copyright 2012 Ed Burns, Creative Commons License 27
if else
Use when you only have two choices to choose from.
Real world example:If lunch is hamburger, get ketchup, otherwise, get mustard.
Computer ProgrammingSimple instructions
![Page 28: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/28.jpg)
Copyright 2012 Ed Burns, Creative Commons License 28
if else
Use when you only have two choices to choose from.
Programming example:if (lunch.equals(“Hamburger”)) { getKetchup();} else { getMustard();}
Computer ProgrammingSimple instructions
![Page 29: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/29.jpg)
Copyright 2012 Ed Burns, Creative Commons License 29
lists
A special kind of variable that holds a list of values
Real world example:Your lunch choices are: hamburger, hot dog, chicken nuggets or green salad
The items in the list are called elements. The lunch choices list has four elements.
Computer ProgrammingSimple instructions
![Page 30: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/30.jpg)
Copyright 2012 Ed Burns, Creative Commons License 30
lists
A special kind of variable that holds a list of values
Programming example:lunchChoices = { “hamburger”, “hot dog”,“chicken nuggets”, “green salad” };print lunchChoices.size();Prints out “4”.
Computer ProgrammingSimple instructions
![Page 31: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/31.jpg)
Copyright 2012 Ed Burns, Creative Commons License 31
loops
A statement that lets you do something with each element in a list.
Real world example:Look at the lunch menu and decide what to eat.
Computer ProgrammingSimple instructions
![Page 32: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/32.jpg)
Copyright 2012 Ed Burns, Creative Commons License 32
loops
A statement that lets you do something with each element in a list.
Programming example:for each (item : lunchChoices) { if (iLikeIt(item)) { eat(item); }}
Computer ProgrammingSimple instructions
![Page 33: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/33.jpg)
Copyright 2012 Ed Burns, Creative Commons License 33
Subroutines
A program within a program. Basically a way to organize your program so it’s easier to read.
Real world example: To eat lunch, you must:
Decide what to eat Buy it Take it to your table Eat it.
Computer ProgrammingSimple instructions
![Page 34: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/34.jpg)
Copyright 2012 Ed Burns, Creative Commons License 34
Subroutines
A program within a program. Basically a way to organize your program so it’s easier to read.
Programming example:lunch = readMenuAndPickItem();buyItem(lunch);table = chooseTable();eatLunchAtTable(lunch, table);
Computer ProgrammingSimple instructions
![Page 35: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/35.jpg)
Copyright 2012 Ed Burns, Creative Commons License 35
Subroutines
Programming example:lunch = readMenuAndPickItem();buyItem(lunch);table = chooseTable();eatLunchAtTable(lunch, table);Subroutines need information to get their work done. The pieces of information given to a subroutine are called arguments.
Computer ProgrammingSimple instructions
![Page 36: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/36.jpg)
Copyright 2012 Ed Burns, Creative Commons License 36
Five basic concepts Variables If and if else statements Lists Loops Sub-routines
Computer ProgrammingSimple instructions
Review
![Page 37: Kids computer-programming](https://reader033.vdocuments.mx/reader033/viewer/2022052323/5590587f1a28ab554b8b471d/html5/thumbnails/37.jpg)
Copyright 2012 Ed Burns, Creative Commons License 37
Computer Programming
Ed Burns, Oracle Corporation