stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
python Flashcards | StudBud
Explore
/
python
Which data type in Python is immutable?
"apple" > "banana"
python
8 terms
·
StudBud Administration
·
12 plays
Imported from external platform
Flashcards
8 cards
F
Practice quiz
P
Host live
L
Questions
8
Answers
1
"apple" > "banana"
None
Error
False
True
2
Which data type in Python is immutable?
List
Dictionary
Tuple
Set
3
What does the "len()" function do in Python?
Performs element-wise addition of two lists
Converts a value to lowercase
Finds the maximum value in a list
Returns the length of a string
4
What is the output of x = 5 y = 3 print(x + y)
8.0
8
'8'
5
5
In Python, what is the purpose of the "elif" keyword?
It is a shorthand for "else if"
It indicates the beginning of a loop
It is used to define a function
It represents the end of a conditional statement
6
What does the "range()" function in Python do?
Generates a sequence of numbers
Performs mathematical operations
Returns the factorial of a number
Converts a string to uppercase
7
Which of the following is a correct way to declare a list in Python?
list4 = "1, 2, 3"
list2 = [1, 2, 3]
list1 = {1, 2, 3
list3 = (1, 2, 3)
8
What will be the output of x = 10 y = 5 print(x % y)
0
15
2
50