Borowiak Computer Science Notes
Borowiak Computer Science Notes
Notes
Function definition- the place where you assign a series of
actions to one easy-to-remember name
Variable- a placeholder for a value that can change
Conditional- A statement that is either true or false
depending on the situation
If statement- a line that determines whether or not you run
a certain chunk of code
Else- another way of saying otherwise
Increment-To add a certain amount once or many times
Decrement- To subtract a certain amount once or many
times
Nested statements- a statement inside another statements
Internet
DNS Table
www.miniclip.com
54.230.16.120
www.youtube.com
64.233.177.136
Agar.io
104.20.38.148
www.coolmath-games.com
www.google.com
www.adamborowiak.weebly.com
www.wikipedia.com
23.235.44.249
173.194.116.116
199.34.228.53
91.198.174.192
Notes
www.bing.com
www.yahoo.com
www.weebly.com
204.79.197.200
98.139.183.24
74.115.50.109
Notes
Four steps
Decompose Figure out the base problem and make it simpler
Patterns Common characteristics, similarities
Abstraction Minimalize the words needed to describe what
needs to be completed
Algorithm Creating a list of directions to get an objective
done or complete
Code
moveFoward();- means to move forward
turnright();- means to turn right
turnleft();-means to turn left
for (var count = 0; count < 2; count++) { go 2 spaces (repeat)
for (var count2 = 0; count2 < 3; count2++) { go 3 spaces (repeat)
moveForward();
while (notFinished()) { repeat until finished
if (isPathLeft()) { if theres a path to the left it will turn left
if (isPathRight()) { if theres a path to the right it will turn right
} else { it will do something If its not there
moveForward(100); go forward 100 pixels
turnRight(90); turn right 90 degrees
penColour('#0000cd'); change color
for (var count = 0; count < 4; count++) { repeat four times\
penColour(colour_random()); random color chossen
Notes
var counter;
for (counter = 25; counter <= 60; counter += 5) {
fill();
Notes
// draw_a_snowman
turnLeft(90);
moveForward(distance);
turnRight(2);
Notes
}
if (counter != 2) {
turnLeft(180);
var counter;
// draw_a_snowman
turnLeft(90);
Notes
for (var count = 0; count < 4; count++) {
}
if (pilePresent()) { if pile present it will dig it up
function fill_5() {
Notes
function draw_a_square() { it will draw a square using the function draw a square