1/32
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
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.
Call a function
Gives the command, so the computer will run the code for that function. Like phoning a friend for help.
A "function" is a way to: ___________
teach karel a new "word" or command
Parameter
Variable passed in from outside function
Procedural Abstraction
Provides name for process and allows procedure to be used only knowing what it does, not necessarily how it does
Modularity
Subdivision of a computer program into separate subprograms
Function body
The part of a function that contains the commands
Writing a function with parameters is like: _________
making a recipe that you can reuse
-- or --
having a friend who can help you with things
When a procedure or function has a "return" it will:
Exit the function and return a value to the main program
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
A "Local Variable" is:
A variable that is restricted to use in a certain scope of a program, such as within a procedure
Runtime Error
Program runs, but crashes when running
Syntax Error
Program doesn't run at all
Logic Error
Program runs, but doesn't do what it is supposed to do.
"API" means:
Application Programming Interface
Standard Library
Baseline, plain version of programming language.
APIs makes it easier to
develop a program by reusing existing code
Karel is an API that is _____
built in JavaScript to make it easier to build cool programs quicker
Documentation
Provides information to show programmers how to use functions and code libraries
Flow Chart
A simple diagram with symbols showing the "flow" of a process
Comments
An annotation in the code of a computer program to help humans understand what the code is doing
Boolean variable
A variable to represent true or false.
Indefinite loop
A looping structure that is not based on a fixed number of repetitions
Definite loop
Executes a loop for a predetermined set of number of times
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.
"Logic Gate" within a CPU (processor)
A hardware abstraction that is modeled by a Boolean function
Declaring Variables
Creating variables in a programming language
String
A series of characters at any length
Integer
A "round" number (no decimals)
Placeholder
symbol or text that temporarily holds the place for a value that will be assigned later
CR
Carriage Return
LF
Line Feed
println
Javascript function that prints out a line to the user