0% found this document useful (0 votes)
323 views7 pages

1-Peterson-Computer Science Notes

This document defines key terms related to computer science and programming. It includes definitions of concepts like algorithms, variables, functions, conditionals, loops, and networking terms. It also includes examples of coding terms and blocks from a game coding environment, demonstrating how to write code to move a character, draw shapes, and repeat actions using loops and conditionals.

Uploaded by

api-302957605
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
323 views7 pages

1-Peterson-Computer Science Notes

This document defines key terms related to computer science and programming. It includes definitions of concepts like algorithms, variables, functions, conditionals, loops, and networking terms. It also includes examples of coding terms and blocks from a game coding environment, demonstrating how to write code to move a character, draw shapes, and repeat actions using loops and conditionals.

Uploaded by

api-302957605
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

September 15, 2015

Automate- Something that automatically happens without humans


Computer Science- The art of blending human ideas and digital tools to

increase problem solving power


Computer Scientist- A person who is skilled at modifying problems for digital

solutions.
Data- Information including facts, samples, names and numbers.
Environment- The world we live in
Interface- the insides of a computer or parts
Open Source- Software available for free for anyone to use
Programming- Writing instructions for a digital tool.
Simulation- Pretending to be the real thing.
Encode- to put something into a coded form.
Decode- to take something out of code.
Computational Thinking- A method of problem solving that helps a computer
scientist prepare problems for digital solutions.
1. Decompose-figure out the problem
2. Patterns- common characteristics, similarities
3. Abstraction- minimalize the words needed to describe what

needs to be completed.
4. Algorithms- creating a list of directions to get the objective done.
Abstraction- removing details from a solution so that it can work for many

problems.
Algorithm- A list of steps that allow you to complete a task.
Decompose- To break a hard problem up into smaller, easier ones.
Pattern- A theme that is repeated many times.
Program- Instructions that can be understood and followed by a machine.
Coding- Transforming actions into a symbolic language.
Debugging- Finding and fixing problems in code
Function- A piece of code that can be called over and over
Parameters- Extra bits of information that you can pass into a function to

customize it.
Function Call- The place in your program where you call a function you have

defined
Function definition- The place where you assign a series of actions to one

easy-to-remember name.
Variable- A place holder for a value that can change.

Conditional- a statement that is either true or false depending of the

situation.
If statement- A line that determines whether or not you run a 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 statement- A statement inside another statement.

IP (Internet Protocol)- An agreed upon set of requirements for delivering

packets across a network


IP Address- A number assigned to any item that is connected to the internet
DNS (Domain Name Service)- The service that translates URLs to IP

addresses.
URL (Universal Resource Locator)-An easy-to-remember address for calling a

web page
Internet- A group of computers and servers that are networked together.
Network- A group of things that are connected to each other.
Packets- Small chunks if information that have been carefully formed from

larger chunks of information.


Routing- finding the best path through a network.
Servers- Computers that exist only to provide i0nformation to others.
Fiber- Optic Cable- A cable that uses light to send information
Wi-Fi- A wireless method of sending information using radio waves
DSL/Cable- A method of sending information using telephone or television
cables.

DNS Table
[Link]
[Link]
[Link]
[Link]
[Link]

[Link]
[Link]
[Link]

[Link]
[Link]

[Link]

[Link]
[Link]

[Link]
[Link]

[Link]

[Link]

[Link]
[Link]

[Link]

Codes
moveForward(); moves the bird forward
turnRight(); makes the bird turn
turnLeft(); makes the bird turn

for (var count = 0; count < 5; count++) {

moveForward();
}
Makes the code repeat x amount of times doing whatever you put into the

code
Gray blocks cant be removed

while (notFinished()) {

moveForward();

This means that it wont stop doing what it is doing until it reaches the end
or the goal

if (isPathLeft()) {

this makes it so if it can turn left then it will turn left but if not it wont turn

while (notFinished()) {

if (isPathForward()) {

moveForward();

} else {

turnLeft();

This means that go forward unless you cant then it will turn left

moveForward(100); this means that it will go 100 pixels forward

turnRight(90); this means it will turn 90 degrees

penColour(colour_random()); this means that a random color will be chosen

dig(); THIS REMOVES WHAT IS ON THAT SPACE

// draw_a_square

for (var count = 0; count < 4; count++) {

moveForward((50));
turnRight(90);
This makes you make a square in a shorter space

var counter;

for (counter = 50; counter <= 90; counter += 10) {


// draw_a_square
for (var count = 0; count < 4; count++) {
moveForward((counter));
turnRight(90);
}
}

This makes you use the counter block that makes it easiesr to repeat

// draw_a_snowman

This draws a snowman

jumpForward(100);

This makes you go forward without drawing

function fill_5() {
for (var count = 0; count < 5; count++) {
fill();
}
}

moveForward();
fill_5();

This is a function block that makes you do a special activity.

var length2;

function draw_a_square(length2) {
for (var count = 0; count < 4; count++) {
moveForward(length2);
turnRight(90);

}
}

function draw_a_triangle(length2) {
for (var count2 = 0; count2 < 3; count2++) {
moveForward(length2);
turnRight(120);
}
}

This is a parameter, that make it so you can make different sized triangles

if (nectarRemaining() > 0) {
getNectar();
}

This makes it so that if there is more than 0 nectar it wwll remove until it is
less than 0.
[Link] my game

You might also like