
Python - 1
Quiz
•
Other
•
University
•
Practice Problem
•
Hard
Aparna Mutnalkar
Used 4+ times
FREE Resource
Enhance your content in a minute
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
In a Python program, a control structure:
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
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
17 questions
Questionnaire Design
Quiz
•
University
10 questions
QUIZ 22/4/24
Quiz
•
University
16 questions
Data Structures Prelimes
Quiz
•
University
10 questions
Logic Pro X - 101
Quiz
•
2nd Grade - University
10 questions
Kuis Audit Syariah
Quiz
•
University
10 questions
Devising
Quiz
•
10th Grade - Professi...
18 questions
Management CH15
Quiz
•
University
10 questions
Guess the blackpink song lyrics
Quiz
•
4th Grade - Professio...
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Other
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University
