python exam 1 questions with correct
answers rated A+ (6)
algorithm - correct answer ✔✔A set of specific steps for solving a category of problems
comment - correct answer ✔✔Text in a program that is meant for other programmers (or anyone
reading the source code) and has no effect on the execution of the program
high-level language - correct answer ✔✔A programming language like Python that is designed to be easy
for humans to read and write.
print - correct answer ✔✔A function used in a program or script that causes the Python interpreter to
display a value on its output device.
runtime error - correct answer ✔✔An error that does not occur until the program has started to execute
but that prevents the program from continuing.
semantic error - correct answer ✔✔An error in a program that makes it do something other than what
the programmer intended.
semantic - correct answer ✔✔the meaning of a program
syntax - correct answer ✔✔The structure of a program
syntax error - correct answer ✔✔An error in a program that makes it impossible to parse — and
therefore impossible to interpret.
string - correct answer ✔✔contains a string of letters
, variable - correct answer ✔✔name that refers to a value
assignment statement - correct answer ✔✔gives value to a variable
statement - correct answer ✔✔instruction that the Python interpreter can execute
operators - correct answer ✔✔special tokens that represent computations like addition, multiplication
and division
evaluate - correct answer ✔✔To simplify an expression by performing the operations in order to yield a
single value.
int - correct answer ✔✔A Python data type that holds positive and negative whole numbers
float - correct answer ✔✔A Python data type which stores floating-point numbers. Floating-point
numbers are stored internally in two parts: a base and an exponent. When printed in the standard
format, they look like decimal numbers
flow of execution - correct answer ✔✔The order in which statements are executed during a program
run.
function - correct answer ✔✔A named sequence of statements that performs some useful operation.
Functions may or may not take parameters and may or may not produce a result
boolean function - correct answer ✔✔A function that returns a Boolean value. The only possible values
of the bool type are False and True.
block - correct answer ✔✔A group of consecutive statements with the same indentation.
boolean expression - correct answer ✔✔An expression that is either true or false.
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Sakayobako30. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.99. You're not tied to anything after your purchase.