stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Play with Python Flashcards | StudBud
Explore
/
Play with Python
Play with Python
24 terms
·
StudBud Administration
·
34 plays
Imported from external platform
Flashcards
24 cards
F
Practice quiz
P
Host live
L
Questions
24
Answers
1
Each statement in python is terminated by Semicolon
True
False
2
Which statement is correct?
List is mutable && Tuple is immutable
Both are Immutable.
List is immutable && Tuple is mutable
Both are Mutable.
3
Which of the following is the correct extension of the Python file?
.p
.pl
.py
.python
4
How to output the string “May you live long” in Python?
print(“May you live long”)
printf(“May you live long”)
echo(“May you live long”)
System.out(“May you live long”)
5
The type() function can be used to get the data type of any object
True
False
6
Which one of the following is not a python’s predefined data type?
Tuple
Dictionary
List
Class
7
Study the following function: round(4.576). What will be the output of this function?
5
576
4
4.5
8
To add a new element to a list we use which Python command?
list1.addLast(5)
list1.addEnd(5)
list1.append(5)
list1.add(5)
9
What is the maximum length of a Python identifier?
No fixed length is specified
16
32
128
10
How to convert the uppercase letters in the string to lowercase in Python?
lowercase()
capilaize()
toLower()
lower()
11
How to capitalize only the first letter of a sentence in Python?
None of the above
upper() method
uppercase() method
capitalize() method
12
Mathematical operations can be performed on a string in Python
True
False
13
Which character is used in Python to make a single line comment?
#
!
//
/
14
Which type of Programming does Python support?
functional programming
all of the mentioned
structured programming
object-oriented programming
15
Which one of the following has the highest precedence in the expression?
Parentheses
Multiplication
Addition
Exponential
16
What is the output of this expression, 3*1**3?
9
1
3
27
17
The looping reduces the complexity of the problems to the ease of the problems.
True
False
18
Who developed Python Programming Language?
Niene Stom
Guido van Rossum
Rasmus Lerdorf
Wick van Rossum
19
Python Dictionary is used to store the data in a ___ format.
index value pair
select value pair
group value pair
Key value pair
20
Which of the following declarations is incorrect in python language?
x_y_z_p = 5,000,000
xyzp = 5,000,000
x,y,z,p = 5000, 6000, 7000, 8000
x y z p = 5000 6000 7000 8000
21
Which of the following is not a keyword in Python language?
val
with
try
raise
22
Which of the following is a Python tuple?
{}
(1,2,3)
{1,2,3}
[1,2,3]
23
What will be the value of the following Python expression? 5 + 4 % 5
4
2
9
6
24
What is the name of the operator ** in Python?
Modulus
Floor division
Exponentiation
None of the mentioned above