strings

strings

University

15 Qs

quiz-placeholder

Similar activities

PP_Lab_ESE_Batch3_Quiz_2023_24

PP_Lab_ESE_Batch3_Quiz_2023_24

University

10 Qs

Python Basics-1

Python Basics-1

University

10 Qs

Python Pandas Series

Python Pandas Series

University

15 Qs

Quiz 9

Quiz 9

University

17 Qs

InCube #Quiz 2

InCube #Quiz 2

University

15 Qs

Data Analytics using Python - Quiz 2

Data Analytics using Python - Quiz 2

University

15 Qs

numpy library

numpy library

University

15 Qs

Sports Challenge

Sports Challenge

University

10 Qs

strings

strings

Assessment

Quiz

Computers

University

Medium

Created by

Ms. Deepika

Used 3+ times

FREE Resource

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

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?