stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Python Quiz Flashcards | StudBud
Explore
/
Python Quiz
Python Quiz
20 terms
·
StudBud Administration
·
20 plays
Imported from external platform
Flashcards
20 cards
F
Practice quiz
P
Host live
L
Questions
20
Answers
1
In which language is Python written?
Python
C++
None of these
C
2
The number or word we give to a variable
Bug
Information
Text
Value
3
How do you start writing an if statement in Python?
None of the above
if x>y then:
if x>y:
if (x>y)
4
Which one of the following is not a keyword in Python language?
assert
pass
eval
nonlocal
5
Which of the following concepts is not a part of Python?
Pointers
All of the above
Loops
Dynamic typing
6
What will be the output of the following code snippet?
float and float
float and int
int and float
int and int
7
What will be the output?
GEEKSFORGEEKSgeeksforgeeks
GEEKSFORGEEKS
geeksforgeeks
Run time error (Multiple operators in a single if statement)
8
What will be the output of the following code snippet?
(1,2,3)
[2,2,3]
(2,2,3)
Error
9
How do you start writing a for loop in Python?
for x>y:
None of the above
for each x in y:
for x in y:
10
Which of the following are valid string manipulation functions in Python?
upper()
count()
strip()
All of the above
11
How do you start writing a while loop in Python?
while (x>y)
while x>y{
while x>y:
x>y while {
12
Which statement is used to stop a loop?
break
stop
exit
return
13
Which operator is used to multiply numbers?
X
#
%
*
14
Which type of Programming does Python support?
All of the above
structured programming
functional programming
object oriented programming
15
Which of the following character is used to give single-line comments in Python?
//
#
<!-- -->
$
16
Which of the following is a feature of Python DocString?
In Python all functions should have a docstring
All of the mentioned
A way of associating documentation with Python modules, functions, class
Docstrings can be accessed by the __doc__ attribute on objects
17
What will be the output of the following code snippet?
20
None of these
0
15
18
Which of the following modules need to be imported to handle date time computations in Python?
datetime
date
timedate
time
19
What will be the output of the following code snippet?
['Monday','Tuesday','Wednesday']
None of these
['Sunday','Monday','Wednesday']
['Sunday','Monday','Tuesday','Wednesday']
20
How is a code block indicated in Python?
None of the above
Key
Bracket
Indentation