stud
bud
Sign up
Log in
Home
Library
Explore
SAT
More
Quiz Strings Flashcards | StudBud
Explore
/
Quiz Strings
Quiz Strings
10 terms
·
StudBud Administration
·
82 plays
Strings questions
Flashcards
10 cards
F
Practice quiz
P
Host live
L
Questions
10
Answers
1
Strings are immutable in Python, which means a string cannot be modified.
False
True
2
Python strings have a property called “immutability.” What does this mean?
Strings in Python can be represented as arrays of chars
Strings can’t be divided by numbers
Strings in Python can’t be changed
You can update a string in Python with concatenation
3
What is the output of the following string comparison
False,True
True,True
True,False
False,False
4
Which of the following declaration is correct.
@x=3
%xyz__=5
_x=2
None of these
5
In Python, strings are
immutable
string object
char arrays
changeable
6
Guess the correct output of the following String operations
Welcome
WelcomeWelcome
TypeError: unsupported operand type(s)
Welcome*2
7
Which of the following statements assigns the value 100 to the variable x in Python
x = 100
let x = 100
x := 100
x ← 100
8
Select the correct output of the following String operations
My name is james bond
TypeError: unsupported operand type(s) for * or pow(): ‘str’ and ‘int’
None
My Name Is James Bond
9
Which method should I use to convert String
"welcome to the beautiful world of python"
to
title()
upper()
capitalize()
swapcase()
10
Which of the following mathematical operator can be used to concatenate strings
-
/
%
+