x=5
y=3
z=x*y
z=z+2
print(z) CORRECT ANSWER-17
What is the output of the following code?
print(((2 ** 3) + 3 * 5) * (sqrt(49) // 4) + (23 % 7) CORRECT ANSWER-25.0
write one line of code that prints the value of square root of 3
import math
# your code goes here CORRECT ANSWER-print(math.sqrt(3))
Which of the following are valid names in python? (choose all that apply)
a. 3rdplace
b. Length
c. kinetic-energy CORRECT ANSWER-b
What will be printed to the screen after running the following code:
x=4
y=x*2
x = y
y=6
print(x,y) CORRECT ANSWER-8 6
, floating-point numbers have a decimal point (true or false) CORRECT ANSWER-true
integers can be positive, negative, or zero (true or false) CORRECT ANSWER-true
which of the following expressions produce a floating-point for variable x? choose all that apply
a. x = 100.0 + 2
b. x = 3.5
c. x = float(True)
d. x = 8/2
e. x = '2.0'
f. x = 8 // 3 CORRECT ANSWER-a, b, c, d
which of the following results in the Boolean value True?
a. int(True)
b. bool(0)
c. bool('False')
d. bool(' ') CORRECT ANSWER-c
which of the following is a valid operation (will NOT result in an error)?
a. answer = bool("Howdy" + str(3))
b. msg = "25" * "Whoop!"
c. x = "102" - "2"
d. y = int("12.34") CORRECT ANSWER-a
fill in the missing code: