exam 1 Flashcards
A program receives data from a file, keyboard, touchscreen, network, etc.
Input
A program performs computations on that data, such as adding two values like x + y.
Process
A program puts that data somewhere, such as a file, screen, or network.
Output
A sequence of instructions that solves a problem
algorithm
A common way to become familiar with algorithms
turtle graphics
a program that allows the user to execute one line of code at a time.
interactive interpreter
a computer program that executes code written in the Python programming language.
Python interpreter
a common word for the textual representation of a program
Code
a row of text.
line
what is “»>” called?
prompt
a program instruction. A program mostly consists of a series of statements, and each statement usually appears on its own line.
statement
are code that return a value when evaluated
Expressions
A new variable is created by performing an _____ using the “=” symbol
assignment
function displays variables or expression values.
print()
Characters such as “#” denote
comments
Text enclosed in quotes is known as a ____. May have letters, numbers, spaces, or symbols like @ or #.
string literal
keeps the output of a subsequent print statement on the same line separated by a single space
end=’ ‘
Output can be moved to the next line by printing __ , known as a _______ .
“\n” , newline character
Any space, tab, or newline is called
whitespace
The function ______ causes the interpreter to wait until the user has entered text and pushed the return key.
input()
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
a ____ determines how a value can behave
type
violates a programming language’s rules on how symbols can be combined to create a program.
syntax error
a program’s syntax is correct but the program attempts an impossible operation
runtime error