Q: 1
How can you assign number 1,000,000 (int type) to the variable in Python? (select 2)
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 2
DRAG DROP Arrange the code boxes in the correct positions in order to obtain a loop which executes its body with the level variable going through values 5, 1, and 1 (in the same order).
Drag & Drop
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 3
What will be the value of X in the following Python expression?
X = 2+9*((3*12)-8)/10
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 4
DRAG DROP Drag and drop the code boxes in order to build a program which prints Unavailable to the screen. (Note: one code box will not be used.)
Drag & Drop
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 5
The following variable was created:
course_name = 'python interview'
in a global scope. How can you remove this variable? (select 3)
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 6
How many stars will the following code send to the monitor?
x = 0
while x < 6:
x += 1
if x % 2 == 0:
continue
print('*')
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 7
What is scope?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 8
DRAG DROP Assuming that the phonc_dir dictionary contains namemumber pairs, arrange the code boxes to create a valid line of code which retrieves Martin Eden's phone number, and assigns it to the number variable.
Drag & Drop
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Q: 9
Why are local variable names beginning with an underscore discouraged?
Options
Discussion
No comments yet. Be the first to comment.
Be respectful. No spam.
Question 1 of 20 · Page 1 / 2


