What will be the output of the following code? x = 5 y = "Hello" z = 3.0 print(type(x), type(y), type(z))
Python Quiz

Quiz
•
Computers
•
Professional Development
•
Hard
Vandana Vandana
Used 6+ times
FREE Resource
27 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
<class 'int'> <class 'string'> <class 'float'>
<class 'int'> <class 'str'> <class 'float'>
<class 'int'> <class 'string'> <class 'complex'>
<class 'float'> <class 'int'> <class 'str'>
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is the correct syntax to declare a function in Python?
def function_name:
def function_name[]:
def function_name():
define function_name():
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the result of the following operation? result = 7 // 2 print(result)
3.5
3
4
2.5
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid variable name in Python?
_myvar
my_var2
2varname
myVar
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following code? my_list = [1, 2, 3, 4, 5] my_list.append([6, 7]) print(my_list)
[1, 2, 3, 4, 5, 6, 7]
[1, 2, 3, 4, 5, [6, 7]]
[1, 2, 3, 4, 5, 6, [7]]
[1, 2, 3, 4, 5, 6, 7, [8]]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code? my_list = [10, 20, 30, 40, 50] print(my_list[1:4])
[20, 30, 40]
[10, 20, 30, 40]
[30, 40, 50]
[20, 30, 40, 50]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which method is used to add multiple elements to a list in Python?
append()
extend()
insert()
add()
Create a free account and access millions of resources
Similar Resources on Quizizz
28 questions
Java Chapter 4 Review Questions

Quiz
•
Professional Development
22 questions
Microsoft 98-365 Server Admin Part 2

Quiz
•
KG - Professional Dev...
22 questions
HiTech Quiz 6

Quiz
•
Professional Development
30 questions
SERTIFICATE-Zerde

Quiz
•
Professional Development
25 questions
Infinity coding school

Quiz
•
Professional Development
30 questions
Quiz 6.1

Quiz
•
Professional Development
26 questions
Python Data Structures

Quiz
•
University - Professi...
30 questions
python quiz 1

Quiz
•
Professional Development
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade