
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
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
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Python Functions and File Handling Quiz

Quiz
•
University
17 questions
EVG BAZ

Quiz
•
1st Grade - Professio...
10 questions
Snakes

Quiz
•
3rd Grade - Professio...
10 questions
Python quiz - 1

Quiz
•
University
10 questions
Evaluación Final - Protocolo # 5

Quiz
•
University
10 questions
Literature Review Quiz

Quiz
•
University
10 questions
Evaluación sobre Arduino Uno en Robótica

Quiz
•
5th Grade - University
15 questions
PSUP

Quiz
•
University
Popular Resources on Wayground
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
10 questions
Ice Breaker Trivia: Food from Around the World

Quiz
•
3rd - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
20 questions
ELA Advisory Review

Quiz
•
7th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Multiplication and Division Unknowns

Quiz
•
3rd Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Other
11 questions
NFL Football logos

Quiz
•
KG - Professional Dev...
20 questions
Definite and Indefinite Articles in Spanish (Avancemos)

Quiz
•
8th Grade - University
7 questions
Force and Motion

Interactive video
•
4th Grade - University
36 questions
Unit 5 Key Terms

Quiz
•
11th Grade - University
38 questions
Unit 6 Key Terms

Quiz
•
11th Grade - University
20 questions
La Hora

Quiz
•
9th Grade - University
7 questions
Cell Transport

Interactive video
•
11th Grade - University
7 questions
What Is Narrative Writing?

Interactive video
•
4th Grade - University