
Python_Quiz_2(Datatypes)
Quiz
•
Computers
•
University
•
Practice Problem
•
Hard
Anil Chinchawade
Used 6+ times
FREE Resource
Enhance your content in a minute
18 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
In this list, how will you access the letter ‘g’ in ‘bat’?
list1 = [1,['a','b',['orchid', 'college', 'Solapur'],'c'],3]
list1[1, 2, 1, 5]
list1[2][1][5]
list1[1][2][1][5]
list1[1][5][1]
2.
MULTIPLE SELECT QUESTION
1 min • 1 pt
What is the value of y?
>>> x, y, z = (1,2,3,4,5,6,7,8,9,10)[2::3]
2
5
6
This code raises an exception
3.
MULTIPLE SELECT QUESTION
1 min • 1 pt
In the following code, how many objects and references does Python create?
name = "Orchid"
college_name = name
One object, one reference
One object, two references
Two objects, one reference
Two objects, two references
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
What is the output of the following code?
>>> list = ['a','b','c']
>>> list += 'de'
>>> print(list)
[‘a’, ‘b’, ‘c’, ‘d’, ‘e’]
[‘a’, ‘b’, ‘c’, ‘de’]
[‘ade’, ‘bde’, ‘cde’]
This raises an exception because we cannot add a string to a list
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
How will you cannot create a dictionary?
d = {'milk': 50, 'celery': 40}
d = dict(milk=50, celery=40)
d = dict([ ('milk', 50), ('celery', 40) ])
d = { ('milk', 50), ('celery', 40) }
d = {} d['milk'] = 50 d['celery'] = 40
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
In the following code, how will you get to the value 7?
list[‘cheese’][‘spoons’]
list[2][‘utensils’][‘spoons’]
list[‘spoons’]
list[‘utensils’][‘spoons’]
7.
MULTIPLE SELECT QUESTION
1 min • 1 pt
Which of these can you use as a dictionary key?
Please select 2 correct answers
‘key’
{‘a’:1, ‘b’:2}
[‘1’,’2’]
(‘key’, ‘value’)
5j
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
15 questions
Introducción Redes Tele1 IB
Quiz
•
10th Grade - University
20 questions
SOFTWARE 7I
Quiz
•
7th Grade - University
15 questions
Teknik dalam Pemikiran Komputasional
Quiz
•
University
20 questions
Spreadsheet Fundamentals - Quiz2
Quiz
•
University
20 questions
Algoritma Remedial RPL
Quiz
•
University
15 questions
Pra UAS Algoritma dan Pemrograman Lanjut
Quiz
•
University
20 questions
Skill Competition Quiz 2024
Quiz
•
10th Grade - University
15 questions
[CEH4H3] Sistem Tertanam Ganjil 1819 Kuis Online 2
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
