Python Strings

Python Strings

Professional Development

10 Qs

quiz-placeholder

Similar activities

Move 5: Embrace A Better Approach to Teaching "Sight Words"

Move 5: Embrace A Better Approach to Teaching "Sight Words"

Professional Development

10 Qs

Vegetables

Vegetables

1st Grade - Professional Development

11 Qs

LDM2-SESSION 3

LDM2-SESSION 3

Professional Development

10 Qs

Phyton  Review Lesson 1-10

Phyton Review Lesson 1-10

12th Grade - Professional Development

5 Qs

Hukum & Praktik Keperawatan

Hukum & Praktik Keperawatan

University - Professional Development

15 Qs

3D Printing Basic Quiz

3D Printing Basic Quiz

Professional Development

10 Qs

FOH Quizz

FOH Quizz

Professional Development

14 Qs

ORGANIZATIONAL STRUCTURE OF AVIATION MAINTENANCE

ORGANIZATIONAL STRUCTURE OF AVIATION MAINTENANCE

Professional Development

10 Qs

Python Strings

Python Strings

Assessment

Quiz

Education

Professional Development

Practice Problem

Hard

Created by

Meena Natarajan

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following statement are true?

Strings....

are enclosed by single quotation marks only

are enclosed by double quotation marks only

Can include letters, digits, special characters, and spaces

can include letters, digits, special characters, but not spaces

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Select the correct output of the following String operations

strOne = str("pynative")

strTwo = "pynative"

print(strOne == strTwo)

print(strOne is strTwo)

False False

True True

True False

False True

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following string operations?

str = "My salary is 7000";

print(str.isalnum())

True

False

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which method should I use to convert String "welcome to the beautiful world of python" to "Welcome To The Beautiful World Of Python"

capitalize()

title()

upper()

lower()

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code?

str1 = "My salary is 7000";

str2 = "7000"

print(str1.isdigit())

print(str2.isdigit())

False

True

False

False

True

False

True

True

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Guess the correct output of the following code.

str1 = "PYnative"

print(str1[1:4], str1[:5], str1[4:], str1[0:-1], str1[:-1])

PYn PYnat ive PYnativ vitanYP

Yna PYnat tive PYnativ vitanYP

Yna PYnat tive PYnativ PYnativ

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Select the correct output of the following String operations

str = "my name is James bond";

print (str.capitalize())

My Name Is James Bond

TypeError: unsupported operand type(s) for * or pow(): 'str' and 'int'

My name is james bond

mY NAME IS JAMES BOND

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?