strings

strings

University

15 Qs

quiz-placeholder

Similar activities

Numpy

Numpy

University

20 Qs

PP_Lab_ESE_Batch3_Quiz_2023_24

PP_Lab_ESE_Batch3_Quiz_2023_24

University

10 Qs

numpy and pandas GDSC

numpy and pandas GDSC

University

15 Qs

numpy library

numpy library

University

15 Qs

Data Analytics using Python - Quiz 2

Data Analytics using Python - Quiz 2

University

15 Qs

Python Pandas Series

Python Pandas Series

University

15 Qs

strings

strings

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

Ms. Deepika

Used 3+ times

FREE Resource

AI

Enhance your content in a minute

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

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

import pandas as pd

sports = pd.Series(['Virat', 'azam', 'fiNch', 'ShakiB', 'STOKES', 'KAne'])

print(s.str.upper())

Upper Case:

0 VIRAT

1 AZAM

2 FINCH

3 SHAKIB

4 STOKES

5 KANE

dtype: object

0 VIRAT

1 AZAM

2 FINCH

3 SHAKIB

4 STOKES

5 KANE

dtype: object

error

0 VIRAT

1 AZAM

2 FINCH

4 STOKES

5 KANE

dtype: object

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Returns the index at where the given string is found

find()

split()

replace()

len()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Checks whether the character is uppercase or not

upper()

isupper()

casefold()

none

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Identifies the length of the string.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import pandas as pd

sports = pd.Series(['Virat', 'azam', 'fiNch', 'ShakiB', 'STOKES', 'KAne'])

print((s.str.isupper())

0 False

1 False

2 False

3 True

4 True

5 False

0 False

1 False

2 False

3 True

4 True

5 False

0 False

1 False

2 False

3 False

4 True

5 False

error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

import pandas as pd

sports = pd.Series(['Virat', 'azam', 'fiNch', 'ShakiB', 'STOKES', 'KAne'])

print("Length of strings:")

print(s.str.len())

Length of strings:

0 5

1 4

2 5

3 6

4 6

5 4

dtype: int64

Length of strings:

0 5

1 2

2 5

3 6

4 6

5 4

dtype: int66

Length of strings:

0 6

1 4

2 5

3 6

4 6

5 4

dtype: int64

Length of strings:

0 5

1 4

2 5

3 6

4 6

5 3

dtype: int64

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

import pandas as pd

sports = pd.Series(['Virat', 'azam', 'fiNch', 'ShakiB', 'STOKES', 'KAne'])

print(s.str.split('a'))

error

0 [Vir,at]

1 [a, z, m]

2 [fiNch]

3 [Sha, kiB]

4 [STOKES]

5 [KAne]

dtype: object

0 [Vir, t]

1 [, z, m]

2 [fiNch]

3 [Sh, kiB]

4 [STOKES]

5 [KAne]

dtype: object

none

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?

Discover more resources for Computers