NEW
Font size
WorksheetsInit Me 3.1-1
Total questions: 13
Worksheet time: 8mins
What is the correct Python expression to compute the following mathematical expression?
2πn(en)n
(2*math.pi*n)**0.5*((n/math.e)**n
math.sqrt(2*math.pi*n)*n**(n/math.e)
2*math.pi*n**0.5*math.pow(n/math.e,n)
((2*math.pi*n)**0.5)*n/math.e**n
math.sqrt(2*math,pi*n)*n**(n/math.e)
Which choice has a different result from the expression
not (50 >= 14)
3+8 >= 15 or 5 <= 3
3-4 <= 10 and 3 > 3
14/7 < 1 or not (9 < 4)
Give the following variable assignments
Which of the following expressions has the value of False?
(a > 0) or not (b != "Yes")
(a < c**2) and (c > a+d) and not False
False or (c**2 == (d+1)**2)
not (True and c < d and c > b)
None of the above choices is correct.
What is the output of the following code fragment?
Step one.
Step two.
Step three.
Step one.
End game.
None of the above choice is correct.
What will be displayed on the screen after running the following code fragment?
x
30
True
False
The program contains an error on line 4.
What is the output of the following program?
a = 20,
b = 9.32,
c = 2
a = 30,
b = 9.32,
c = 10
a = 30,
b = 9.32,
c = 2
a = 20.68,
b = 9.32,
c = 2
a = 20.68,
b = 2,
c = 2
What gets printed?
1
2
3
4
ERROR, this code will not run.
Which statement causes an error?
True = 1
Python = 1
math = 1
pi = 1
All of the above choices.
Which command causes an error?
Which line of code fragment causes an error?
lines 1 and 2
line 3
line 4
line 5
line 6
Which Boolean expression is NOT equivalent to the statement
"i is an even number"
i%2 < 1
i%2 == 0
not (i%2 > 0)
not (i%2 != 1)
Which of the following choices does not contain Python reserved words (keywords)?
elif/if/else
import/from
def/return
true/false
not/and/or
คนที่สอนวันนี้ชื่อว่าอะไร (คะแนน x2)
พี่โบ๊ท
พี่บอส
พี่จิตรทัศน์
พี่บาส
