1-4) (154 questions with verified
solutions)
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, or
network.
computational thinking,
creating a sequence of instructions to solve a problem
algorithm
A sequence of instructions that solves a problem
Python interpreter
a computer program that executes code written in the 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
row of text
prompt
indicates the interpreter is ready to accept code
statement
a program instruction
Expressions
code that return a value when evaluated
cariables
named references to values stored by the interpreter
print()
function that displays variables or expression values
'#"
character tha denote comments, which are optional but can be used to
explains portions of code to a human reader
string literal
text enclosed in quotes (single or double) and can contain letters,
numbers, spaces, or symbols
Why would a programmer add
, end=' ' inside of print()?
To keep the output on the same line
print(variable_name) without quotes
to output the value of a variable
\n
newline character; output can be moved to the next line
whitespace
any space, tab, or newline
variable = input()
reads a user-enter string and changes it into a variable
type
determines how a value can behave
int()
converts a string to an integer
syntax error
violating a programming language's rules on how symbols can be
combined to create a program
runtime error
program's syntax is correct, but the program attemps an impossible
operation, such as dividing by zero or multiplying strings together
crash
Abrupt and unintended termination of a program