ANSWERS
/. Python formats all floating-point numbers to two decimal places when outputting with
the print statement. TRUE OR FALSE? - Answer-FALSE
/.Comments in Python begin with the # character. TRUE OR FALSE - Answer-TRUE
/.What symbol is used to mark the beginning and end of a string?
a quote mark (")
a slash (/)
a comma (,)
an asterisk (*) - Answer-A quote mark
/.The ________ function reads a piece of data that has been entered at the keyboard
and returns that piece of data, as a string, back to the program.
input()
str_input()
output()
eval_input() - Answer-input()
/.What is the informal language, used by programmers use to create models of
programs, that has no syntax rules and is not meant to be compiled or executed?
flowchart
algorithm
pseudocode
source code - Answer-pseudocode
/.result = 8 * 2 + 8 // 4 - Answer-18
/.The % symbol is the remainder operator, also known as the ________ operator. -
Answer-modulus
/.After the execution of the following statement, the variable sold will reference the
numeric literal value as a(n) ________ data
type.sold = 256.752
float
currency
int
, str - Answer-float
/.What is the output of the following print statement?print('I\'m ready to begin')
Im ready to begin
I'm ready to begin
I\'m ready to begin
'I\'m ready to begin' - Answer-I'm ready to begin
/.n PyCharm, what feature will alter a code file so that it conforms to the Python.org PEP
8 coding style guide?
A.
Refactor
B.
Reformat Code
C.
Debug
D.
Help - Answer-Reformat Code
/.Computer programs typically perform three steps: input is received, some process is
performed on the input, and output is produced. TRUE OR FALSE - Answer-TRUE
/.Which of the following is the correct if clause to determine whether choice is anything
other than 10?
if choice != 10
if not(choice < 10 and choice > 10):
if choice != 10:
if choice <> 10: - Answer-if choice != 10:
/.Python allows you to compare strings, but it is not case sensitive. TRUE OR FALSE -
Answer-FALSE
/.Which of the following is the correct if clause to determine whether y is in the range 10
through 50, inclusive?
if y >= 10 or y <= 50:
if y >= 10 and y <= 50:
if 10 < y or y > 50:
if 10 > y and y < 50: - Answer-if y >= 10 and y <= 50:
/.Python uses the same symbols for the assignment operator as for the equality
operator. TRUE OR FALSE - Answer-FALSE