Docsity

Code.org: AP Computer Science Principles Unit 3: Into to Programming with sample code. Qu, Exams of Computer Networks

Toggle sidebar
bg1
Code.org: AP Computer Science Principles Unit 3:
Into to Programming with sample code. Questions
and answers Graded A+
The need for algorithms - ✅✅The way we express solutions to problems in
computer science. Once we identify the problem, we can use this to solve the
problem and ideally a whole class of similar problems.
Algorithms - ✅✅A precise sequence of instructions for processes that can be
executed by a computer and are implemented using programming languages.
Low level programming language - ✅✅A programming language that captures
only the most primitive operations available to a machine. Anything that a
computer can do can be represented with combinations of low level commands.
High level programming language - ✅✅A programming language with many
commands and features designed to make common tasks easier to program. Any
high level functionality is encapsulated as combinations of low level commands.
Sequencing - ✅✅The application of each step of an algorithm in the order in
which the statements are given.
Selection - ✅✅Uses a Boolean condition (a TRUE/FALSE condition) to
determine which of two parts of an algorithm is used.
Iteration - ✅✅The repetition of part of an algorithm until a condition is met or
for a specified number of times.
pf3
pf4

Partial preview of the text

Download Code.org: AP Computer Science Principles Unit 3: Into to Programming with sample code. Qu and more Exams Computer Networks in PDF only on Docsity!

Code.org: AP Computer Science Principles Unit 3:

Into to Programming with sample code. Questions

and answers Graded A+

The need for algorithms - ✅✅The way we express solutions to problems in computer science. Once we identify the problem, we can use this to solve the problem and ideally a whole class of similar problems. Algorithms - ✅✅A precise sequence of instructions for processes that can be executed by a computer and are implemented using programming languages. Low level programming language - ✅✅A programming language that captures only the most primitive operations available to a machine. Anything that a computer can do can be represented with combinations of low level commands. High level programming language - ✅✅A programming language with many commands and features designed to make common tasks easier to program. Any high level functionality is encapsulated as combinations of low level commands. Sequencing - ✅✅The application of each step of an algorithm in the order in which the statements are given. Selection - ✅✅Uses a Boolean condition (a TRUE/FALSE condition) to determine which of two parts of an algorithm is used. Iteration - ✅✅The repetition of part of an algorithm until a condition is met or for a specified number of times.

Building blocks of programming languages - ✅✅The most simple commands of a programming language Efficiency - ✅✅Getting things done with the least amount of time and resources Call (a function) - ✅✅Telling a computer to execute/run a set of actions Function - ✅✅A piece of code that you can easily call over and over again. Define (a function) - ✅✅Give a name to a set of actions you want the computer to perform Purpose of functions - ✅✅Name groupings of programming instructions and help people better understand programs, condense code to make quick and more efficient Abstraction - ✅✅Pulling out specific differences to make one solution work for multiple problems. Top Down Design - ✅✅Problem solving strategy in breaking down a large problem into sub-tasks and breaking those sub-tasks down over and over until you're down to primitive operations API - ✅✅A collection of commands made available to a programmer

function drawSide() { moveForward(); moveForward(); turnLeft(); turnLeft(); turnLeft(); } function drawBox() { drawSide(); drawSide(); drawSide(); drawSide(); } function next() { moveForward(); moveForward(); turnLeft(); turnLeft(); turnLeft(); moveForward(); turnLeft(); } - ✅✅