Python Strings

Python Strings

8th - 12th Grade

14 Qs

quiz-placeholder

Similar activities

Python - Week 1

Python - Week 1

8th - 10th Grade

10 Qs

Python

Python

10th Grade

9 Qs

C-Programming Basics

C-Programming Basics

12th Grade

16 Qs

Quiz Week 6

Quiz Week 6

10th Grade

10 Qs

KODEKIDDO HACK #MLH3

KODEKIDDO HACK #MLH3

4th Grade - University

10 Qs

Python Programming

Python Programming

7th - 9th Grade

10 Qs

Introduction to Programming

Introduction to Programming

9th Grade

12 Qs

Chapter 1 Python

Chapter 1 Python

8th Grade - University

12 Qs

Python Strings

Python Strings

Assessment

Quiz

Computers

8th - 12th Grade

Medium

Created by

Suman Joshi

Used 1K+ times

FREE Resource

14 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Python accepts single ('), double (") and triple (''' or """) quotes to denote strings. Which of the following is NOT acceptable Python syntax?

print('Hello World')

print("Hello World")

print('Hello World")

print(""'Hello World'"")

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is printed by the following statement?

print("P" not in "APCSP")

True

False

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is printed by the following statement?

print("A" in "APCSP")

True

False

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Evaluate the following expression:

"dog" < "Dog"

They are the same word

True

False

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

For strings, the + operator represents

Concatenation

Addition

Appending

Recantation

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

data = "No Way!" The expression len(data) evaluates to:

7

9

8

6

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator returns True if target string is somewhere in the search string; otherwise it returns False.

==

!=

in

is

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?