Python Round 2

Quiz
•
Computers
•
University
•
Hard
Noor Malik
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
How do you print the length of a list named `my_list` in Python?
print(length(my_list))
print(len(my_list))
print(my_list.length())
2.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What does the `range(5)` function return?
A list containing [0, 1, 2, 3, 4]
A list containing [1, 2, 3, 4, 5]
A list containing [5, 4, 3, 2, 1]
3.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
How do you concatenate two lists `list1` and `list2` in Python?
list1 + list2
concatenate(list1, list2)
list1.concat(list2)
4.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the output of the following code?
```python
my_string = "Hello, World!"
print(my_string[7:])
```
Hello
World!
, World!
5.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
How do you sort a list `my_list` in ascending order?
sorted(my_list)
my_list.sort()
sort(my_list)
6.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the output of the following code?
```python
def my_func(x, y):
return x + y
print(my_func(2, 3))
```
5
23
2 + 3
7.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
What is the purpose of the `lambda` keyword in Python?
To define a new variable
To define a new function
To define a new class
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
PYTHON_CHAPTER 3

Quiz
•
University
12 questions
javaquizvivek

Quiz
•
University
15 questions
Cybernaut Analysis

Quiz
•
University
13 questions
Python Module 1

Quiz
•
University - Professi...
15 questions
Grade 8 End of Unit Revision

Quiz
•
8th Grade - University
6 questions
Week7 Lab1

Quiz
•
University
15 questions
Round 1 (Tech Utsav)

Quiz
•
University
10 questions
Python Quiz

Quiz
•
University
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
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University