Python Strings and Methods Quiz

Python Strings and Methods Quiz

9th Grade

20 Qs

quiz-placeholder

Similar activities

Digital Information

Digital Information

9th - 12th Grade

15 Qs

MEMBUAT LAPORAN DAN PRESENTASI

MEMBUAT LAPORAN DAN PRESENTASI

9th Grade

15 Qs

Css test1

Css test1

2nd Grade - University

20 Qs

Class 9 Viva Questions 9B mideterm

Class 9 Viva Questions 9B mideterm

9th Grade

20 Qs

Экзамен C++ ОП

Экзамен C++ ОП

9th - 12th Grade

17 Qs

Unit 2 The Internet

Unit 2 The Internet

9th - 12th Grade

18 Qs

HTML Quiz Week 1-2

HTML Quiz Week 1-2

9th Grade

20 Qs

Access Intro 8/9

Access Intro 8/9

9th Grade

17 Qs

Python Strings and Methods Quiz

Python Strings and Methods Quiz

Assessment

Quiz

Information Technology (IT)

9th Grade

Medium

Created by

Fadi Fadi

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a string in Python?

A number

A list

An array of characters

A boolean

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Are strings mutable in Python?

Yes

No

Sometimes

Only with split()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the following code return? "Hello World".split()

['H', 'e', 'l', 'l', 'o']

['Hello', 'World']

['Hello World']

Syntax error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following can be used as a separator in split()?

Space

Comma

Any character

All of the above

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of text.split(",") if text = "a,b,c"?

['abc']

['a', 'b', 'c']

['a,b,c']

['a b c']

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a CSV file?

A picture

A Python library

A text file with comma-separated values

A type of loop

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens if you use split() on a string with multiple spaces?

['The', '', '', 'cat']

['The', 'cat']

['The cat']

Error

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?