Python Level 2- Lesson 2

Quiz
•
Computers
•
10th Grade
•
Medium
Coding Bot
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
What is the main purpose of the number_of_sides(shape) function in the provided Python code?
To calculate the perimeter of a geometric shape.
To determine the number of sides of a given shape.
To generate random shapes for visualization.
o classify shapes based on their dimensions.
2.
MULTIPLE SELECT QUESTION
45 sec • 10 pts
If the shape provided to the number_of_sides(shape) function is not recognized, what does it return?
Invalid Shape
Shape not found
None
Error
3.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
How does the user input a shape in the provided program?
Through a graphical interface
By typing the shape's name in the console
Using the turtle.textinput() function
Through a command-line argument.
4.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
What is the difference between a set and a list in Python?
A set is ordered, while a list is unordered.
A set allows duplicate elements, while a list does not.
Elements in a set are accessed by index, while elements in a list are accessed by key.
Elements in a set are immutable, while elements in a list are mutable.
5.
MULTIPLE SELECT QUESTION
45 sec • 10 pts
Which function converts temperature from Celsius to Fahrenheit?
Select the fuction name AND return (2 ANSWERS)
celsius_to_fahrenheit()
fahrenheit_to_celsius()
return (celsius * 9/5) + 32
return (fahrenheit - 32) * 5/9
6.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
my_list = [1, 2, 3, 4, 5]
Which of the following Python code snippets will print all the elements of the list my_list?
for element in my_list:
print(element)
for i in range(len(my_list)):
print(my_list[i])
for i in range(my_list):
print(i)
for element:
print(my_list[element])
7.
MULTIPLE CHOICE QUESTION
45 sec • 10 pts
What will be the output of the following Python code snippet?
0
1
10
15
120
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
Type data python

Quiz
•
9th Grade - University
14 questions
year 8 lesson 2 quiz - python

Quiz
•
8th - 10th Grade
10 questions
Quiz1_HPB2021_2010t1

Quiz
•
1st - 12th Grade
11 questions
datatypes

Quiz
•
10th - 12th Grade
10 questions
AP CSP - Python Lists and Arrays

Quiz
•
9th - 12th Grade
10 questions
Estructura Condicional If en Python

Quiz
•
10th Grade
10 questions
Exercícios de Array no Python

Quiz
•
10th Grade
10 questions
ภาษาไพทอน

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
10 questions
1.2 OSI & TCP IP Models Quiz

Quiz
•
10th Grade
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
20 questions
Hardware vs. Software Quiz

Quiz
•
7th - 10th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade