If you are looking for important QnA String Manipulation in Python Class 11. Enjoy this article!
If you missed earlier QnA Articles, please refer the below given link:
QnA String Manipulation in Python Class 11
In this article we will see Objective Type Questions, Short answer questions and Application based questions. Let us start with Objective type questions:
Objective type questions
Fill in the blanks
- The data or text enclosed with single quote, double quote or triple quote is known as _____________.
- The string which is having 0 characters is known as ___________.
- Each character in a string has a unique position or ID in the text, that is known as ___________.
- The index of string is start from _______ to ___________ in forward direction.
- The process of accessing a string character by character is known as __________.
- The ___________ operator is used to repeat the word or specified text n times.
- To join more than two words you can use __________ operator.
- The ______________ operator returns True if a character or specified atring is available in the given string.
- The _________ and ____________ operators are membership operators.
- To reverse a string using string slice, __________ is an easy way to do so.
- Empty String
- 0, length-1
- * (Replication)
- + (Concatenation)
- in, not in
The next section of QnA String Manipulation in Python Class 11 provides MCQs from the topic.
Multiple Choice Questions
 Which of the following is the correct way of indexes of string, begin from the reverse in backward direction?
i) 0 to Length – 1
ii) -1 to -length
iii) -length to – 1
iv) Length -1 to 0
a) i), ii) and iii)
b) ii) and iv)
c) Only Option ii)
d) ii), iii) and iv)
 Iterating through the various elements of a string, one character at a time is known as ____________
a) String Indexing
b) String Traversing
c) String Replicating
 When you write S[-5] for a five letter word, python will return
 What will be the result of this code: ‘2’ + 3
 What will be the result of this code: ‘*’ * 3
 The expression “CSIP” in “TutorialAICSIP” returns
 The expression “Tutor” <=”TutorialAICSIP” returns
 Which of the following function returns the ASCII code for specified character?
 Which of the following function returns the character from given integer code?
 What will be the result of s[len(s),-3]
a) Return 3 letters from reverse
c) First 3 letters of string
d) None of these
 To print first 4 letters from the string, which of the option(s) is/are correct?
a) Option i) and iv)
b) Option ii) and iii)
c) Option ii) Only
d) Option iii) only
 Which of the following is not a correct string operation in python?
a) ‘Tut’ + ‘or’
b) ‘Tutor’ * 2
c) ‘Tutor’ + 2
d) 2 * ‘Tutor’
- b) ii) and iv)
- b) String Traversing
- c) Error
- c) ***
- b) True
- b) True
- c) ord()
- d) chr()
- b) Error
- b) Option ii) and iii)
- c) ‘Tutor’ + 2
In the next section of QnA String Manipulation in Python Class 11, we will give you some questions. To find the answers read our recommended article.
Short answer questions
- What do you mean by a string? How it differs from other data types?
- Justify the statement – “Python strings are immutable”.
- What do you mean by index? What is the key role of indexes in a python string?
- What do you mean by traversing? Elaborate your answer with an example.
- Write code to print alternate characters of the given string in the output.
- What are the differences between + and * operator in the string?
- How to work with ASCII values in python? Explain all the possible ways or functions deals with ASCII values in python. Support your answer with at least one example of each.
- Explain the following string slices in your words with appropriate examples:
In the next section of QnA String Manipulation in Python Class 11 we will discuss output based questions.
Output Based Questions
Observe the following code and predict the output:
 Code 1:
print(""" T U T O R I A L A I C S I P """)
 Code 2:
a = str("786") b = "Python" * 4 print(a,b) a = a + b print(len(a))
 Code 3:
s="python string fun" for i in range(0,len(s)): if s[i]>='c' and s[i]<='l': print(s[i].lower(),end="") else: print(s[i].upper(),end="")
 Code 4:
s="python string fun" while True: if s=='p': s = s[3:] elif s[-1]=='n': s=s[:2] else: break print(s)
 Code 5:
s="python" s1="" s2="" s3="" if s[-1]=='n': s1 = s[0:3] print(s1) if 'h' in s: s2=s + 'i' print(s2) if 'z' not in s: s3 = '7' + s[1:] + 'w' print(s3) else: s = s* 3 print(s)
Click here to access topic wise study material for class 11.
Download the QnA String Manipulation in Python Class 11 as PDF.