
Chapter 1 to Chapter 5 python
Authored by Chong May
Information Technology (IT)
University
Used 72+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
45 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What symbol is used to write a single-line comment in Python?
//
<!--
#
/*
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following best describes the difference between Python 2 and Python 3?
Python 3 is just a faster version of Python 2.
Python 2 uses print as a function, while Python 3 uses print as a statement.
Python 3 uses print as a function, while Python 2 uses print as a statement.
Python 2 supports more libraries than Python 3.
3.
OPEN ENDED QUESTION
5 mins • 5 pts
Write a simple python program to remove duplicate elements from a list.
Input: [1, 2, 2, 3, 4, 4, 5]
Output: [1, 2, 3, 4, 5]
Evaluate responses using AI:
OFF
Answer explanation
Answer 1:
numbers = [1, 2, 2, 3, 4, 4, 5]
unique_numbers = []
for num in numbers:
if num not in unique_numbers:
unique_numbers.append(num)
print("List after removing duplicates:", unique_numbers)
Answer 2:
# Input list
numbers = [1, 2, 2, 3, 4, 4, 5]
# Remove duplicates using set and convert back to list
unique_numbers = list(set(numbers))
# Optional: sort the result to maintain order
unique_numbers.sort()
# Output
print("List after removing duplicates:", unique_numbers)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct extension of a Python file?
.pyth
.pt
.py
.p
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which keyword is used to define a function in Python?
function
def
fun
define
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of: print(type("Hello"))
<type 'string'>
<class 'int'>
<class 'str'>
str
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid Python data type?
array
tuple
list
dictionary
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
50 questions
Midterm GEE-LIE
Quiz
•
University
40 questions
QUIZ 3 - Data Design and Database Management
Quiz
•
University
50 questions
Java қазақша 1 - 50
Quiz
•
University
49 questions
Digital Citizenship and ICT Quiz
Quiz
•
8th Grade - University
40 questions
xtgfrt
Quiz
•
University
50 questions
Java қазақша 201 - 250
Quiz
•
University
49 questions
Network Analysis Quiz
Quiz
•
University
50 questions
BSIT2102 PL Networking1 Tuando
Quiz
•
University
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
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
20 questions
Figurative Language Review
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
12 questions
IREAD Week 4 - Review
Quiz
•
3rd Grade - University
23 questions
Subject Verb Agreement
Quiz
•
9th Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
7 questions
Renewable and Nonrenewable Resources
Interactive video
•
4th Grade - University
5 questions
Poetry Interpretation
Interactive video
•
4th Grade - University
19 questions
Black History Month Trivia
Quiz
•
6th Grade - Professio...
15 questions
Review1
Quiz
•
University
15 questions
Pre1
Quiz
•
University