Terms in this set (207)
What is the output of the please wait
following code?
name = 123
if name.startswith("a"):
print("welcome")
else:
print("please wait")
Given the following string: print(s + 1)
s = "Welcome"
which code results in an
error?
What does the input() a string value
function return?
What is the value of x after 4
the following code is run?
x=2
y=1
x += y + 1
,Which statements evaluate "The Title".istitle()
True and without errors? "upper".islower()
(Choose all that apply.)
What is the order of *, /, +, -
precedence (from first to
last) of the math operators?
Which statement sets the s = "Chapter" + str(1)
variable s to a value of
"Chapter1"?
What is "print" used for? To display output
What is the output of the She said, "Who's there?"
following code?
print("She said, \"Who's
there?\"")
Which operator can be +
used to combine two
strings?
If book_title = "The "x" in book_title
Xylophone Case" which
code will return True?
What are the advantages of code reuse
creating and using functions easier testing
in code? (Choose all that
apply.)
Which of the following is a print ()
Python function?
, Analyze the following code The program has a SyntaxError in line 2: if even = True:
and choose the most
correct statement:
even = False
if even = True:
print("It is even!")
Which of the following is a # comment
valid Python comment
structure?
For the code x >= y which x x = "a", y = "A"
and y values evaluate True?
Which is a Python method num1 = int(input("enter a number"))
of getting numeric input
that can be used in math?
Which is not a possible while 0 > 1:
"infinity/infinite" loop?
Which of the following Python variables are case sensitive
statements is true?
What will be displayed by Hello Hello Hello Hello Hello
the following code?
count = 0
while count < 5:
print("Hello", end = " ")
count +=1
Jupyter Notebooks have True
code cells and markdown
cells.