Font size
WorksheetsXII - CS - Lesson 8 - Strings and String Manipulation
Total questions: 25
Worksheet time: 18mins
String is (a) in python
(a) handle array of characters
(a) is a sequence of Unicode characters that may be a combination of letters, numbers, or special symbols enclosed within single, double or even triple quotes.
Which can't be used to represent strings?
' '
" "
''' '''
{ }
(a) once defined, it cannot be changed during execution.
(a) are immutable
To include string with single quote, ______ should be used to represent string.
' '
" "
( )
{ }
________ is used to represent multi line strings.
' '
" "
''' '''
{ }
What is used to access and manipulate the strings?
Index values
Subscript
Either a or b
Neither a or b
The subscript can be _________ numbers
Positive
Negative
Either a or b
Neither a or b
The positive subscript ______ is assigned to the first character.
1
o
0
-1
___ index values is used assign to the last character in a string in forward indexing. if n is size of string.
n
-n
n-1
n+1
The negative index assigned from the last character to the first character in reverse order begins with _____
1
0
-1
-n
(a) () function changes all occurrences of a particular character in a string.
Joining of two or more strings is called as
Concatenation
Replicating
Appending
Assigning
Which operator is used for string concatenation?
(a)
Adding more strings at the end of an existing string is known _______
Concatenation
Replicating
Append
Assigning
Which operator add more strings at the end of an existing string ?
(a)
The (a) oprerator is used to display a string in multiple number of times.
(a) is a substring of a main string
A substring can be taken from the original string by using ___________
Index values
[ ]
Both a and b
Either a or b
Using ______ operator, you have to slice one or more substrings from a main string
Slice
Stride
Repeatng
Join
Identify the slice operator?
[ ]
{ }
( )
< >
_______ refers to the number of characters to move forward after the first character is retrieved from the string
Start
End
Stride
[ ]
Default value of stride is (a)
