stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python coding & designing competition Flashcards | StudBud
Explore
/
Python coding & designing competition
Python coding & designing competition
30 terms
·
StudBud Administration
·
257 plays
Phyton coding and designing competition
Flashcards
30 cards
F
Practice quiz
P
Host live
L
Questions
30
Answers
1
What will be the output of the following code snippet?
[4, 7, 19, 2, 89, 45,72, 22]
[2, 4, 22, 72]
[2, 4, 7, 19, 22, 45, 72, 89]
[7, 19, 45, 89]
2
What will be the output of the following code snippet?
1 2 3 . . . . . . 15
0 3 6 9 12
Infinite loop
0 3 6 9 12 15
3
What will be the output of the following Python code?
3
4
5
0
4
Which of the following functions is a built-in function in python?
factorial()
seed()
sqrt()
print()
5
What will be the output of the following Python code?
7
0
Error
6
6
What is ^ in python
Both A and B
When used with number, it provides the bitwise XOR of 2 numbers
None of the above
When used with sets, it signifies the symmetric difference of 2 sets
7
What will be the value of the following Python expression?
7
2
4
1
8
Find the output of the following
[1,2,3,4,5]
[1,4,9,16,25]
[0,1,2,3,4]
[0,1,4,9,16]
9
Write a python script to print docstring ( documentation string ) of input function
type(input)
help(input)
print(input)
find(input)
10
What will be the result of the following expression in Python ?
7
77
3
0
11
What will be the output of the following Python code?
Tuples can’t be made keys of a dictionary
16
25
17
12
Find the output
5
Syntax error
15
None of the above
13
What will be the output of the following code snippet?
6 , Error
12 , Error
6, 12
Error , 12
14
Who developed Python Programming Language?
Guido van Rossum
Wick van Rossum
Rasmus Lerdorf
Niene Stom
15
Find the output of the following
(2,2,3)
(1,2,3)
[2,2,3]
Error
16
Which of the following can't be used in Python
Try
Catch
Except
Finally
17
What will be the output of the following code snippet?
[1, 2]
[1, 2, 1, 2, 1, 2]
Error
[1, 2, 1, 2]
18
What will be the output of the following code snippet?
pYtHoN PrOgRaMmInG
python programming
Python Programming
Python Programmingpython programmingPYTHON PROGRAMMING
19
Which keyword is used for function in Python language?
Function
Define
Def
Fun
20
What is the output of the code ?
1
0
Runtime error
2
21
Which of the following concepts is not a part of python ?
Dynamic Typing
for else loop
Pointers
All of the above
22
What will be the output of the following code?
154
11858
Raises exception
77
23
What will be the output of the following Python code?
1 1 1
1 2 3
An exception is thrown
‘1’ ‘1’ ‘1’
24
What will be the output of the following Python program?
error
None of the above
0 1 2 0
0 1 2
25
Output of the following Python code would be :
del would delete the entire dictionary
del method doesn't exist in dictionary
del would delete all keys in dictionary
del would delete all values present in dictionary
26
What will be the output of the following Python function?
Error
3
6
4
27
Which of the following is the correct extension of the Python file?
.py
.pl
.python
.p
28
Which of the following types of loops are not supported in Python?
while
for
None of the above
do-while
29
What will be the output of the following code snippet?
{1, 2, 3, 4, 5}
None
{1, 5}
{1, 2, 3, 3, 2, 4, 5, 5}
30
In which language is Python written?
C++
Java
C
None of the above