Python String Operations Quiz

Python String Operations Quiz

University

58 Qs

quiz-placeholder

Similar activities

Python Programming EndTerm

Python Programming EndTerm

University

61 Qs

Data Structure

Data Structure

University

60 Qs

Python basics

Python basics

University

60 Qs

[Kuis 1/4 ] Class Diagram dan Dasar Pengetahuan PBO

[Kuis 1/4 ] Class Diagram dan Dasar Pengetahuan PBO

University

60 Qs

CBT - Revision # 3

CBT - Revision # 3

12th Grade - University

54 Qs

MOCK CBT 3

MOCK CBT 3

University

60 Qs

Electronics #2: Operational Amplifier & Power Amplifier

Electronics #2: Operational Amplifier & Power Amplifier

University

53 Qs

#2 CIW Data Analyst - Certification Prep

#2 CIW Data Analyst - Certification Prep

9th Grade - University

54 Qs

Python String Operations Quiz

Python String Operations Quiz

Assessment

Quiz

Computers

University

Practice Problem

Hard

Created by

ANKUSH JOSHI

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

58 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? print("Python"[0])

P

y

t

Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct way to define a string in Python?

str = 'Hello'

str = "Hello"

str = '''Hello'''

All of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you find the length of a string in Python?

len(string)

length(string)

string.size()

string.length()

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you concatenate two strings in Python?

str1 + str2

str1.concat(str2)

str1.add(str2)

str1 & str2

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? print("Python" + " Programming")

PythonProgramming

Python Programming

Python + Programming

Python

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code? print("Hello"[1:4])

ell

llo

Hel

lo

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of "Python"[-1]?

P

n

y

Error

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?