WORKSHEET ON TEXT HANDLING IN PYTHON - 2

WORKSHEET ON TEXT HANDLING IN PYTHON - 2

11th - 12th Grade

10 Qs

quiz-placeholder

Similar activities

strings

strings

11th Grade

15 Qs

ONE 6th FORM Introduction to Python Basics

ONE 6th FORM Introduction to Python Basics

11th Grade

15 Qs

Untitled Quiz

Untitled Quiz

9th Grade - University

14 Qs

Python Strings

Python Strings

8th - 12th Grade

14 Qs

Section 4A: Decompose the code using functions

Section 4A: Decompose the code using functions

12th Grade

14 Qs

DICTIONARIES

DICTIONARIES

11th Grade

8 Qs

Understanding Procedures in Python

Understanding Procedures in Python

9th Grade - University

10 Qs

Python Workshop Week 1 Review

Python Workshop Week 1 Review

9th - 12th Grade

10 Qs

WORKSHEET ON TEXT HANDLING IN PYTHON - 2

WORKSHEET ON TEXT HANDLING IN PYTHON - 2

Assessment

Quiz

Computers

11th - 12th Grade

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?