1/70
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
What is the first step in programming?
Designing the program.
What tools help with program design?
Flowcharts and pseudocode.
What is the purpose of Programming Logic and Design?
To focus on flowcharts and pseudocode.
Why is program design important?
The design is the foundation of a good program.
What are the steps in the program development cycle?
Design the program, write the code, correct syntax errors, test the executable code, and debug the code.
What are the two steps in designing a program?
Understand the tasks the program must perform and determine the steps needed to perform the task.
What is an algorithm?
Step-by-step directions to solve a problem.
What is pseudocode?
Fake code used as a model for programs.
Does pseudocode have strict syntax rules?
No, pseudocode does not have syntax rules.
Why is well-written pseudocode useful?
It can be easily translated into actual code.
What is a flowchart?
A diagram that graphically depicts the steps that take place in a program.
What is the purpose of a flowchart connector symbol?
To break a flowchart into two or more smaller flowcharts placed side-by-side.
What is an off-page connector symbol used for?
To connect flowcharts on different pages.
What is output?
Data generated and displayed by a program.
What is input?
Data that a program receives.
What are variables?
Storage locations in memory for data.
What are the three basic steps followed by computer programs?
Input is received, processing is performed, and output is produced.
What is an IPO chart?
A chart that describes the input, processing, and output of a program.
What does Display do?
It shows output to the screen.
What does Input do?
It takes values from the user of the program.
What is sequence in programming?
Lines execute in the order they appear.
What are string literals?
A sequence of characters.
What are the rules for variable names?
They must be one word, have no spaces, avoid punctuation characters, and generally cannot start with a number.
What naming convention is popular for variables?
camelCase.
What is variable assignment?
Setting a variable value through an assignment statement.
Give an example of assignment statement.
Set price = 20.
What are common math operators?
Addition, subtraction, multiplication, division, modulus, and exponent.
What does the addition operator do?
Adds two numbers.
What does the subtraction operator do?
Subtracts one number from another.
What does the multiplication operator do?
Multiplies one number by another.
What does the division operator do?
Divides one number by another and gives the quotient.
What does MOD do?
Divides one number by another and gives the remainder.
What does the exponent operator do?
Raises a number to a power.
What is a data type?
It defines the type of data stored in a variable.
What are common data types?
Integer, real, and string.
What does an integer data type store?
Whole numbers.
What does a real data type store?
Whole or decimal numbers.
What does a string data type store?
A series of characters.
Why should variables be initialized?
To avoid safety issues and logic errors.
What is a named constant?
A name that represents a value that cannot be changed.
Why use named constants?
They make programs more self-explanatory and changes only need to be made in one place.
What is hand tracing?
A debugging process for locating hard-to-find errors in a program.
How is hand tracing performed?
By creating a chart with a column for each variable and a row for each line of code.
What is external documentation?
Documentation that describes aspects of a program for the user.
What is internal documentation?
Comments that explain how parts of a program work for the programmer.
What is the input for a batting average program?
The number of hits and the number of times at bat.
What is the process for calculating batting average?
Divide the number of hits by the number of times at bat.
What is the output of a batting average program?
The player's batting average.
What does Java System.out.println() do?
It displays a line of output and advances the cursor to the next line.
What does Java System.out.print() do?
It displays output without advancing to the next line.
What is a Java Scanner object used for?
Reading keyboard input.
How do you read an integer in Java?
Use keyboard.nextInt().
How do you read a real number in Java?
Use keyboard.nextDouble().
How do you read a string in Java?
Use keyboard.nextLine().
What does the Java + operator do in output statements?
It combines multiple items for display.
What operators are used for calculations in Java?
+, -, *, /, and %.
What keyword creates named constants in Java?
final.
What symbol starts a single-line Java comment?
//.
What does Python print() do?
It displays output on the screen.
How are variables created in Python?
By using assignment statements.
How do you read string input in Python?
Use input().
How do you read an integer in Python?
Use int(input()).
How do you read a real number in Python?
Use float(input()).
What operators are used for calculations in Python?
+, -, *, /, %, and **.
What symbol starts a Python comment?
#
What statement displays output in C++?
cout.
What operator follows cout in C++?
The << operator.
How do you read input in C++?
Use cin.
What function reads strings containing spaces in C++?
getline().
What keyword creates named constants in C++?
const.
What symbols are used for C++ comments?
// for single-line comments and /* */ for multiline comments.