What are the steps in the program development cycle?
Design the program, write the code, correct syntax errors, test the program, correct logic errors
What is an algorithm?
A set of well-defined logical steps that must be taken to perform a task
What is pseudocode?
Informal “fake code” with no syntax rules, not meant to be executed; used to design programs
What is a flowchart?
A diagram that graphically depicts the steps in a program using symbols connected by arrows
What are the three main steps of computer processing?
Receive input, perform processing, produce output
What does the print() function do?
Displays output on the screen
What is a string?
A sequence of characters used as data
What is a string literal?
A string appearing in a program’s code, enclosed in quotes
What is a comment in Python?
An explanatory note beginning with #, ignored by the interpreter
What is a variable?
A name that represents a value stored in memory
What is the assignment operator in Python?
The equal sign (=)
What is multiple assignment?
Assigning values to multiple variables in one statement: x, y, z = 0, 1, 2
List the rules for naming variables in Python.
Cannot be a keyword, no spaces, must start with a letter or underscore, may use letters/digits/underscores after, case-sensitive
How does the input() function work?
Displays a prompt, reads keyboard input as a string, and assigns it to a variable
How do you convert input to an integer or float?
Use int(item) or float(item)
What are operands and operators?
Operands are values; operators perform operations (e.g., +, -, *, /, //, %, **)
What is the difference between / and // in Python?
/ performs floating-point division; // performs integer division
What does the % operator do?
Returns the remainder of a division (modulus)
What determines operator precedence in Python?
Parentheses > Exponentiation > Multiplication/Division/Modulus > Addition/Subtraction
What is string concatenation?
Joining strings together using +
What are escape sequences?
Special characters preceded by \, like \n (newline) or \t (tab)
What is an f-string?
A string prefixed with f that supports variable placeholders and formatting
What are magic numbers?
Unexplained numeric values in code (e.g., balance * 0.069)