In a Python program, a control structure:

Python - 1

Quiz
•
Other
•
University
•
Hard
Aparna Mutnalkar
Used 4+ times
FREE Resource
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
Dictates what happens before the program starts and after it terminates
Defines program-specific data structures
Directs the order of execution of the statements in the program
Manages the input and output of control characters
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What signifies the end of a statement block or suite in Python?
A comment
A line that is indented less than the previous line
}
end
3.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
Suppose you have the following variables defined: a = 100
b = 50
Write a Python if/else statement to assign the smaller of a and b to the variable m.
if a < b:
m = a
else:
m = b
if a < b
m = a
else:
m = b
if a > b
m = b
else
m = a
if a < b
m = a
else
m = b
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following are true of Python dictionaries:
Dictionaries can be nested to any depth.
Dictionaries are accessed by key.
Items are accessed by their position in a dictionary.
Dictionaries are mutable.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What statement will remove the entry in the dictionary for key 'baz'?
d.remove('baz')
pop('baz')
del d['baz']
del d('baz')
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Once again consider this dictionary:
d = {'foo': 100, 'bar': 200, 'baz': 300}
What is the result of this statement: d['bar':'baz']
It raises an exception
[200, 300]
(200, 300)
200 300
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
The Python interpreter takes the code that you write and converts it to the language that the computer’s hardware understands.
Is this statement True or False?
True
False
Create a free account and access millions of resources
Similar Resources on Quizizz
15 questions
TXT (Tomorrow X Together) Quiz

Quiz
•
KG - Professional Dev...
10 questions
k pop

Quiz
•
KG - Professional Dev...
10 questions
UNIT1_PYTHON

Quiz
•
University
15 questions
TXT THEORY

Quiz
•
8th Grade - Professio...
10 questions
PYTHON set4

Quiz
•
University
9 questions
quiz - 7(exceptions and file handling)

Quiz
•
12th Grade - University
15 questions
Tomorrow X Together

Quiz
•
KG - Professional Dev...
16 questions
kpop

Quiz
•
KG - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade