
WORKSHEET ON TEXT HANDLING IN PYTHON - 1
Authored by RANJITA SARKAR
Computers
11th - 12th Grade
Used 3+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
To concatenate two strings to a third what statements are applicable?
a) s3 = s1 . s2
b) s3 = s1.add(s2)
c) s3 = s1.__add__(s2)
d) s3 = s1 * s2
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
print('abcdefcdghcd'.split('cd', 2))
a) [‘ab’, ‘ef’, ‘ghcd’]
b) [‘ab’, ‘efcdghcd’]
c) [‘abcdef’, ‘ghcd’]
d) none of the mentioned
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
print('ab\ncd\nef'.splitlines())
a) [‘ab’, ‘cd’, ‘ef’]
b) [‘ab\n’, ‘cd\n’, ‘ef\n’]
c) [‘ab\n’, ‘cd\n’, ‘ef’]
d) [‘ab’, ‘cd’, ‘ef\n’]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
print('Ab!2'.swapcase())
a) AB!@
b) ab12
c) aB!2
d) aB1@
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
print('ab cd ef'.title())
a) Ab cd ef
b) Ab cd eF
c) Ab Cd Ef
d) None of the mentioned
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
print('ab cd-ef'.title())
a) Ab cd-ef
b) Ab Cd-ef
c) Ab Cd-Ef
d) None of the mentioned
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code snippet?
print('abcd'.translate('a'.maketrans('abc', 'bcd')))
a) bcde
b) abcd
c) error
d) bcdd
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
Review for Midterm Test ICT 3
Quiz
•
1st - 11th Grade
15 questions
Data Security Worksheet
Quiz
•
10th Grade - University
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
10 questions
Explorando Tinkercad en Secundaria
Quiz
•
7th Grade - University
10 questions
COMPUTACIÓN II
Quiz
•
12th Grade
10 questions
MEDIA AND INFORMATION LITERACY
Quiz
•
12th Grade
10 questions
Bài 8- CĐ F-TH10
Quiz
•
9th - 12th Grade
15 questions
REVIEW WEB SERVER ASJ XI TKJ
Quiz
•
11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade