
WORKSHEET ON TEXT HANDLING IN PYTHON - 2

Quiz
•
Computers
•
11th - 12th Grade
•
Hard
RANJITA SARKAR
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?print("ab\tcd\tef".expandtabs())
a) ab cd ef
b) abcdef
c) ab\tcd\tef
d) ab cd ef
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?print("ab\tcd\tef".expandtabs(4))
a) ab cd ef
b) abcdef
c) ab\tcd\tef
d) ab cd ef
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?print("ab\tcd\tef".expandtabs('+'))
a) ab+cd+ef
b) ab++++++++cd++++++++ef
c) ab cd ef
d) none of the mentioned
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?print("abcdef".find("cd") == "cd" in "abcdef")
a) True
b) False
c) Error
d) None of the mentioned
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?print("abcdef".find("cd"))
a) True
b) 2
c) 3
d) None of the mentioned
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?print("ccdcddcd".find("c"))
a) 4
b) 0
c) Error
d) True
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?print("Hello {0} and {1}".format('foo', 'bin'))
a) Hello foo and bin
b) Hello {0} and {1} foo bin
c) Error
d) Hello 0 and 1
Create a free account and access millions of resources
Similar Resources on Wayground
11 questions
Python Quiz

Quiz
•
12th Grade
10 questions
Unit 1 Post Test: Basic Python

Quiz
•
9th - 12th Grade
14 questions
Python (I)

Quiz
•
12th Grade
10 questions
Mastering String Operations in Python

Quiz
•
9th Grade - University
14 questions
Understanding Python Basics

Quiz
•
8th Grade - University
13 questions
QUIZZI khởi động thực hành DH

Quiz
•
10th Grade - University
15 questions
Python Quiz

Quiz
•
12th Grade
10 questions
Exploring Python: Input and Output Essentials

Quiz
•
9th Grade - University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
20 questions
Digital Citizenship

Quiz
•
8th - 12th Grade
35 questions
Computer Baseline Examination 2025-26

Quiz
•
9th - 12th Grade
13 questions
Problem Solving Process

Quiz
•
9th - 12th Grade
10 questions
Understanding Algorithms with Pseudocode and Flowcharts

Interactive video
•
9th - 12th Grade
19 questions
AP CSP Unit 1 Review (code.org)

Quiz
•
10th - 12th Grade