No student devices needed. Know more
5 questions
What is the result of the expression (5 + 2) * 3 in Python?
15
21
17
7
What will the following code print: num1 = 20; num2 = num1 / 2; num3 = num2 * 10 + 3; print(num3)?
203
100
103
53
Which of the following represents modulus in Python?
//
*
%
+
Which of the following correctly represents the order of operations (PEMDAS) in mathematical expressions?
Parentheses, Exponents, Multiplication, Division, Addition, Subtraction
Exponents, Multiplication, Addition, Division, Parentheses, Subtraction
Multiplication, Addition, Subtraction, Exponents, Parentheses, Division
Division, Exponents, Parentheses, Addition, Subtraction, Multiplication
Which of the following Python functions correctly calculates the value of a linear function y=mx+b for given values of m, b, and x?
def linear_function(m, x, b):
return m + b * x
def linear_function(x, m, b):
return m * x + b
def linear_function(x, b, m):
return x + b + m
def linear_function(b, m, x):
return b * x + m
Explore all questions with a free account