
Python Midterm Exam
Authored by Carlos Cabrera
Information Technology (IT)
University
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the result of the following operation? python Copy 7 % 3
1
2
3
4
2.
FILL IN THE BLANK QUESTION
30 sec • 1 pt
Fill in the Blank: Complete the following code to print the type of a variable x which is set to 1.0. python Copy x = 1.0 print(_______(x))
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used to raise a number to the power of another number?
%
**
//
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Fill in the Blank: Write a Python statement that checks if 'apple' is in the list fruits.
in
not in
is
equals
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Write a Python program that prints numbers from 1 to 5 using a for loop.
for i in range(1, 6): print(i)
for i in range(1, 5): print(i)
for i in range(5): print(i)
for i in range(1, 6): print(i, end=' ')
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code? python Copy list = [1, 2, 3, 4, 5] print(list[3])
1
2
3
4
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add 'Python' to the following dictionary as a new key with the value 'Easy'?
my_dict['Python'] = 'Easy'
my_dict.add('Python', 'Easy')
my_dict.insert('Python', 'Easy')
my_dict.update({'Python': 'Easy'})
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?
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Information Technology (IT)
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
5 questions
Helping Build the Internet: Valerie Thomas | Great Minds
Interactive video
•
11th Grade - University
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
19 questions
Review2-TEACHER
Quiz
•
University
15 questions
Pre2_STUDENT
Quiz
•
University
20 questions
Ch. 7 Quadrilateral Quiz Review
Quiz
•
KG - University