APCSP.CodeHS with JS.Unit 5-Functions and Parameters v2

0%Big Idea 3 Mastery
0%Exam Mastery
Build your Mastery score
multiple choiceAP Practice
Supplemental Materials
call kaiCall Kai
Card Sorting

1/32

Last updated 1:04 PM on 9/16/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat
Add student to class section state
Add studentsNo students in these sections. Invite them to track progress!

33 Terms

1
New cards

Define a function

Teach the computer a new command and explain what it should do when receiving that command. Sets the program up for being able to call the function and have it perform the desired task.

2
New cards

Call a function

Gives the command, so the computer will run the code for that function. Like phoning a friend for help.

3
New cards

A "function" is a way to: ___________

teach karel a new "word" or command

4
New cards

Parameter

Variable passed in from outside function

5
New cards

Procedural Abstraction

Provides name for process and allows procedure to be used only knowing what it does, not necessarily how it does

6
New cards

Modularity

Subdivision of a computer program into separate subprograms

7
New cards

Function body

The part of a function that contains the commands

8
New cards

Writing a function with parameters is like: _________

making a recipe that you can reuse

-- or --

having a friend who can help you with things

9
New cards

When a procedure or function has a "return" it will:

Exit the function and return a value to the main program

10
New cards

Scope

for variables, scope defines the part(s) of the program for which it is valid; e.g., a global variable is a valid variable anywhere in the program

11
New cards

A "Local Variable" is:

A variable that is restricted to use in a certain scope of a program, such as within a procedure

12
New cards

Runtime Error

Program runs, but crashes when running

13
New cards

Syntax Error

Program doesn't run at all

14
New cards

Logic Error

Program runs, but doesn't do what it is supposed to do.

15
New cards

"API" means:

Application Programming Interface

16
New cards

Standard Library

Baseline, plain version of programming language.

17
New cards

APIs makes it easier to

develop a program by reusing existing code

18
New cards

Karel is an API that is _____

built in JavaScript to make it easier to build cool programs quicker

19
New cards

Documentation

Provides information to show programmers how to use functions and code libraries

20
New cards

Flow Chart

A simple diagram with symbols showing the "flow" of a process

21
New cards

Comments

An annotation in the code of a computer program to help humans understand what the code is doing

22
New cards

Boolean variable

A variable to represent true or false.

23
New cards

Indefinite loop

A looping structure that is not based on a fixed number of repetitions

24
New cards

Definite loop

Executes a loop for a predetermined set of number of times

25
New cards

Moore's law

Developed by Intel's Gordon Moore, who accurately predicted that the number of transistors that could fit on a chip would roughly double about every 18 months. This law has helped innovators predict and develop technology efficiently for the past 50 years.

26
New cards

"Logic Gate" within a CPU (processor)

A hardware abstraction that is modeled by a Boolean function

27
New cards

Declaring Variables

Creating variables in a programming language

28
New cards

String

A series of characters at any length

29
New cards

Integer

A "round" number (no decimals)

30
New cards

Placeholder

symbol or text that temporarily holds the place for a value that will be assigned later

31
New cards

CR

Carriage Return

32
New cards

LF

Line Feed

33
New cards

println

Javascript function that prints out a line to the user