Python

0 1 2 .... 15
0 3 6 9 12 15
0 2 4 6 8 10 12 14
Infinite Loop
6
9
15
Error
Predict the output
10
20
50
0
Import math abs(math.sqrt(36)) What will be the output of this code?
6
6.0
-6
Error
[1,3,5] [2,4,6]
[2,4,6][2,4,6]
[1,3,5][1,3,5]
[2,4,6][1,3,5]
Predict the output
3 1 3 1
3 1 1 3
1 3 1 3
1 3 3 1
Which of the following is the proper syntax to check if a particular element is present in a list?
If ele in list
If not ele not in list
Both are correct
What will be the output of the following code snippet? example = ["Sunday", "Monday", "Tuesday", "Wednesday"]; print(example[-3:-1])
['Sunday', 'Monday']
['Tuesday', 'Wednesday']
['Monday', 'Tuesday']
['Sunday' , 'Tuesday']
What will be the output of the following code snippet? a = [1, 2] print(a * 3)
Error
[1 2]
[1 1 1 2 2 2]
[1 2 1 2 1 2]
What will be the type of the variable sorted_numbers in the below code snippet?
Tuple
String
List
Error
What will be the output of the following code snippet?
LIST
STRING
FILTER
INT
Predict the output
{'first':'sunday','second':'monday',1:3,2:4}
{1:3,2:4}
{'first':'sunday','second':'monday'}
None of the above
Predict the output
Python Programming
PyThOn PrOgRaMmInG
PYtHoN PrOgRaMmInG
PYtHoN pRoGrAmMiNg
20
45
54
4,5
[5, 6]
[1, 2, 3, 4]
[1, 2, 5, 6]
[1, 2]
{"name":"Python", "url":"https://www.quiz-maker.com/QPREVIEW","txt":"Predict the output","img":"https://www.quiz-maker.com/3012/CDN/90-4398780/2.png?sz=1200"}
Make your own Survey
- it's free to start.