1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
|---|
No study sessions yet.
Which if statement correctly checks if a number (num) is greater than 10 and less than 20?
if num > 10 and num < 20:
Which of the following is the correct method to concatenate two strings s1 and s2?
s1 + s2
Which of the following will result in the substring 'dog' from the string 'bulldog'?
'bulldog'[4:7]
Given the following code: What is printed with the following call: print("add(3, 4)")
add(3, 4)
What is the result of the following expression? 3 + 5 * 2
13
What is the result of the following expression? 5 / 2
2.5
Which of the following expressions evaluates to True?
5 < 3 or 2 > 1
Which of the following is a syntax error?
3 + 5 = x
Which of the following produces a runtime error?
print("Hello" + 3)
Which of the following is an example of a logic error?
Incorrectly calculating an average in a program
Which of the following methods can be used to convert a string s = "123" into an integer?
int(s)
Identify the Python logical operators:
and, or, not