CSE 102 MSU exam 1 ACTUAL UPDATED QUESTIONS AND CORRECT ANSWERS
program consists of instructions executing one at a time
input a program gets data, perhaps from a file, keyboard, touchscreen, network, etc
process a program performs computations on that data, such as adding two values like x +
y
output a program puts that data somewhere, such as to a file, screen, network, etc
computational thinking creating a sequence of instructions to solve a problem, will become increasingly
important for work and everyday life
algorithm a sequence of instructions that solves a problem, generating correct output for
any valid input values
problem solving creating a methodical solution to a given task
Algorithm time efficiency the number of calculations required to solve a problem
Decomposition the breaking down of a complex problem into a series of smaller or simpler
problems
pattern recognition the identification of common characteristics among different problems and within
the same problem. Recognizing these patterns can further simplify the problem
abstraction the generalization of a problem so that a solution can be applied to different
specific problems
python interpreter a computer program that executes code written in Python programming
language
interactive interpreter a program that allows the user to execute one line of code at a time
code a common word for the textual representation of a program
line a row of text in coding
prompt the interactive interpreter displays a prompt that indicates the interpreter is ready
to accept code
, statement a program instruction; mostly consists of a series of statements, and each
statement usually appears on its own line
expressions code that return a value when evaluated; for example, the code wagehouseweeks
is an expression that computes a number
print() this function displays variables or expression values
string literal text enclosed in quotes ^^
Note: whitespace (blank spaces/blank lines) matter; make sure your whitespace
exactly matches the expected output
newline character (\n) Output can be moved to the next line by printing \n
whitespace Any space, tab, or newline is called whitespace.
string The input obtained by input() is any text that a user typed, including numbers,
letters, or special characters such as # or @. Such text in a computer program is
called a string.
syntax error violates a programming language's rules on how symbols can be combined to
create a program
crash a runtime error halts the execution of a program, abrupt and unintended
terminations of programs are called crashes
logic error the program is logically flawed, often called a bug
expression is a combination of items, like variables, literals, operators, and parentheses, that
evaluates to a value, like 2 * (x + 1).
literal is a specific value in code like 2.
operator is a symbol that performs a built-in calculation, like +, which performs addition.
identifier also called a name, is a sequence of letters (a-z, A-Z), underscores (_), and digits
(0-9), and must start with a letter or an underscore.
bit A single 0 or 1 is called a
byte Eight bits, like 11000101
program consists of instructions executing one at a time
input a program gets data, perhaps from a file, keyboard, touchscreen, network, etc
process a program performs computations on that data, such as adding two values like x +
y
output a program puts that data somewhere, such as to a file, screen, network, etc
computational thinking creating a sequence of instructions to solve a problem, will become increasingly
important for work and everyday life
algorithm a sequence of instructions that solves a problem, generating correct output for
any valid input values
problem solving creating a methodical solution to a given task
Algorithm time efficiency the number of calculations required to solve a problem
Decomposition the breaking down of a complex problem into a series of smaller or simpler
problems
pattern recognition the identification of common characteristics among different problems and within
the same problem. Recognizing these patterns can further simplify the problem
abstraction the generalization of a problem so that a solution can be applied to different
specific problems
python interpreter a computer program that executes code written in Python programming
language
interactive interpreter a program that allows the user to execute one line of code at a time
code a common word for the textual representation of a program
line a row of text in coding
prompt the interactive interpreter displays a prompt that indicates the interpreter is ready
to accept code
, statement a program instruction; mostly consists of a series of statements, and each
statement usually appears on its own line
expressions code that return a value when evaluated; for example, the code wagehouseweeks
is an expression that computes a number
print() this function displays variables or expression values
string literal text enclosed in quotes ^^
Note: whitespace (blank spaces/blank lines) matter; make sure your whitespace
exactly matches the expected output
newline character (\n) Output can be moved to the next line by printing \n
whitespace Any space, tab, or newline is called whitespace.
string The input obtained by input() is any text that a user typed, including numbers,
letters, or special characters such as # or @. Such text in a computer program is
called a string.
syntax error violates a programming language's rules on how symbols can be combined to
create a program
crash a runtime error halts the execution of a program, abrupt and unintended
terminations of programs are called crashes
logic error the program is logically flawed, often called a bug
expression is a combination of items, like variables, literals, operators, and parentheses, that
evaluates to a value, like 2 * (x + 1).
literal is a specific value in code like 2.
operator is a symbol that performs a built-in calculation, like +, which performs addition.
identifier also called a name, is a sequence of letters (a-z, A-Z), underscores (_), and digits
(0-9), and must start with a letter or an underscore.
bit A single 0 or 1 is called a
byte Eight bits, like 11000101