
WORKSHEET ON TEXT HANDLING IN PYTHON - 1

Quiz
•
Computers
•
11th - 12th Grade
•
Hard
RANJITA SARKAR
Used 3+ times
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Python quiz

Quiz
•
10th Grade - Professi...
14 questions
PYTHON DICTIONARIES

Quiz
•
11th Grade
10 questions
Python Flow Control

Quiz
•
9th - 12th Grade
10 questions
Python Math

Quiz
•
1st - 12th Grade
15 questions
Programming - Screening Test

Quiz
•
3rd Grade - Professio...
15 questions
Java Script Quiz

Quiz
•
9th - 12th Grade
12 questions
Python Programming Basics

Quiz
•
7th - 11th Grade
15 questions
python basics

Quiz
•
11th Grade - University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
18 questions
Writing Launch Day 1

Lesson
•
3rd Grade
10 questions
Chaffey

Quiz
•
9th - 12th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
22 questions
6-8 Digital Citizenship Review

Quiz
•
6th - 8th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Chaffey

Quiz
•
9th - 12th Grade
40 questions
Algebra Review Topics

Quiz
•
9th - 12th Grade
19 questions
Handbook Overview

Lesson
•
9th - 12th Grade
20 questions
Lab Safety and Lab Equipment

Quiz
•
9th - 12th Grade
20 questions
Getting to know YOU icebreaker activity!

Quiz
•
6th - 12th Grade
12 questions
Macromolecules

Lesson
•
9th - 12th Grade
12 questions
Classifying Polys - 1.1

Quiz
•
10th - 12th Grade
20 questions
1.1 (b) Add / Sub/ Multiply Polynomials

Quiz
•
12th Grade