Questions and CORRECT Answers
The data in __________ is persistent so it is not lost when an application ends.
main memory
the CPU
the application software
disk storage - CORRECT ANSWER - disk storage
The data in __________ is lost when an application ends.
disk storage
the CPU
the application software
main memory - CORRECT ANSWER - main memory
Python is considered a good first language to learn because:
All of the choices are True
it has a simple syntax
Programs can be written quickly.
Powerful for all-purpose programming - CORRECT ANSWER - All of the choices are
True
One of many popular editors for Python that will be used in class is called ________________.
Marz
,Jupyter
Zaturn
Pluto - CORRECT ANSWER - Jupyter
Python comments
are ignored by the compiler
can be used to document what a program or portion of code does
can be used so certain lines of code are not executed during testing
all are true - CORRECT ANSWER - all are true
Which of the following is not a reserved word in Python?
(Hint: It could be used as the name of a variable.)
pass
Number
import
break - CORRECT ANSWER - Number
The data type resulting from the following statement is
print()
integer
float
number
string - CORRECT ANSWER - float
Given: x = 23 , y = 15
, What is the value of new_num after the following statement executes?
new_num = x % y
1
1.533333
.533333
8 - CORRECT ANSWER -8
What will be the result of the following code if the user enters 81 at the prompt?
score_curve = 7
score = input("Enter your score on the exam: ")
score_curve += score
print(score_curve)
88 will be displayed on the console
81 will be displayed on the console
error: you cannot use the += operator to add a string variable to an int value
error: you cannot print a numeric variable - CORRECT ANSWER - error: you cannot use
the += operator to add a string variable to an int value
Which of the following will get a floating-point number from the user?
my_number = input(float("Enter a number:"))
my_number = float(input "Enter a number:")
my_number = float(input("Enter a number:"))
my_number = input("Enter a number:")
float_num = my_number - CORRECT ANSWER - my_number = float(input("Enter a
number:"))