12th Standard Syllabus & Materials
12th Standard
TN 12th Tamil செல்வத்துள் எல்லாம் தலை - வாழ்வியல் இலக்கியம் - திருக்குறள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Tamil எல்லா உயிரும் தொழும் - இலக்கணம் -தொன்மம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Tamil எல்லா உயிரும் தொழும் - செய்யுள்-புறநானுறு Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Tamil நாடு சமூகம் திருவாகம் மனிதம் - உரைநடை உலகம் -இலக்கியத்தில் மேலாண்மை Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Tamil அருமை உடைய செயல் -இலக்கணம் -படைப்பாக்க உத்திகள் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Tamil அருமை உடைய செயல் - துணைப்பாடம் -நடிகர் திலகம் Sample Question Papers Study Material - QB365 Set A

Published on: 19/09/2019
Strings and String Manipulations
Download Tamil Nadu 12th Standard Computer Science question papers, model tests, one-mark questions, important questions, and public exam papers in PDF format. Free study materials and answer keys for TN State Board students.
Questions + Answers key
Take MCQ Computer Science Test

1.
Differentiate upper () and is upper ().
2.
Differentiate lower () and is lower ().
3.
What is the use of find () function? Explain with an example.
4.
Match the following.
| Escape sequence | Description | ||
| i) | \a | (1) | Backspace |
| ii) | \b | (2) | Horizontal tab |
| iii) | \n | (3) | Bell |
| iv) | \t | (4) | Line feed |
5.
What is meant by stride?
6.
Write a program to print the following output
C
CO
COM
COM
COMP
COMPU
COM PUT
COMPUTE
COMPUTER
7.
Write the general format of slice operation.
8.
Write the output for the following if strl = "THIRIKKURAL"
(i) print (strl [0])
(ii) print (strl [0:5])
(ill) print (strl [:5])
(iv) Print (strl [6:])
9.
Write a python a program to print your name 10 times.
10.
How will you manipulate the strings?
11.
12.
13.
How will you delete a string in Python?
14.
Do you modify a string in Python?
15.
What is String?
1.
| isupper () | Returns True if the string is in uppercase. | >>> str1='welcome' >>>print(str1.isupper()) False |
| upper() | Returns the exact copy of the string with all letters in uppercase. |
>>>str1='welcome' >>>print(str.upper()) WELCOME |
2.
| lower() | Returns the exact copy of the string with all the letters in lowercase. |
>>> str1='SAVE EARTH' >>> print(str1.lower()) save eath |
| islower() | Returns True if the string is in lowercase. | >>> str1='welcome' >>> print (str1.islower()) True |
3.
| find(sub[,start[, end]]) | The function is used to search the first occurrence of the sub string in the given string. It returns the index at which the substring starts. It returns -1 if the substring does not occur the string. |
>>> str1='mammals' >>> str1.find('ma') 0 On omitting the start parameters, the function starts the search from the beginning. >>> str1.find('ma',2) 3 >>> str1.find('ma',2,4) -1 Displays -1 because the substring could no be found between the index 2 and 4-1. >>> str1.find('ma', 2,5) 3 |
4.
3, 1,4, 2
5.
When the slicing operation, you can specify a third argument as the stride, which refers to the number of characters to move forward after the first character is retrieved from the string. The default value of stride is 1.
6.
strl ="COMPUTER"
index = 0
for i in strl:
print (strl [:index+ 1])
index+=I
7.
General format of slice operation:
str[start:end]
Where start is the beginning index and end is the last index value of a character in the string. Python takes the end value less than one from the actual index specified.
8.
(i) T
(ii) THIRU
(iii) THIRU
(iv) KURAL
9.
strl = input ("Enter your name")
print (strl * 10)
10.
(i) Once you define a string, python allocate an index value for its each character.
(ii) These index values are otherwise called as subscript which are used to access and manipulate the strings. The subscript can be positive or negative integer numbers.
11.
12.
13.
Python will not allow deleting a particular character in a string. Whereas you can remove entire string variable using del command.
Example :
>>> strl="How about you"
>>> print (str1)
How about you
>>> del str1
>>> print (str1)
Traceback (most recent call last):
File "
print (strl)
NameError : name 'str1' is not defined
14.
Strings in python are immutable. That means, once you define a string moditications or deletion is not allowed. However, we can replace the existing string entirely with the new string.
15.
(i) String is a data type in python, which is used to handle array of characters.
(ii) String 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.
(iii) Example :
Welcome to learning Python"
"Welcome to learning Python"
""Welcome to learning Python""
12th Standard Syllabus & Materials
12th Standard
TN 12th Tamil அருமை உடைய செயல் - செய்யுள்-தேவாரம் Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Tamil அருமை உடைய செயல் - செய்யுள்-பெருமாள் திருமொழி Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Tamil அருமை உடைய செயல் - செய்யுள்-தெய்வமணிமாலை * Sample Question Papers Study Material - QB365 Set A
NEW12th Standard
TN 12th Tamil நாகரிகம், தொழில், வணிகம், ஆளுமை - உரைநடை உலகம் -திரைமொழி Sample Question Papers Study Material - QB365 Set A
Tamilnadu Stateboard 12th Standard Subjects

Maths

Chemistry

Physics

Biology

Computer Science

Business Maths and Statistics

Economics

Commerce

Accountancy

History

Computer Applications

Biology

Computer Technology

Computer Applications

Computer Science

Business Maths and Statistics

Commerce

Economics

Maths

Chemistry

Physics

Computer Technology

History

Accountancy

Tamil

English

French
Tamilnadu Stateboard Standards