(2.7) String Methods

(2.7) String Methods

12th Grade

20 Qs

quiz-placeholder

Similar activities

Basic Python Concepts and Console Interaction

Basic Python Concepts and Console Interaction

11th - 12th Grade

20 Qs

Python - The Basics

Python - The Basics

9th - 12th Grade

18 Qs

ASK T2 - Kod Arahan (Python)

ASK T2 - Kod Arahan (Python)

7th Grade - University

20 Qs

The String Class

The String Class

12th Grade

20 Qs

Introduction to Python

Introduction to Python

KG - University

25 Qs

Python 1

Python 1

1st Grade - University

17 Qs

Coding Basics

Coding Basics

9th - 12th Grade

20 Qs

Database Query

Database Query

11th - 12th Grade

16 Qs

(2.7) String Methods

(2.7) String Methods

Assessment

Quiz

Computers

12th Grade

Medium

Created by

Raheem Chowdhury

Used 2+ times

FREE Resource

20 questions

Show all answers

1.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

String str = "Hello World";

int len = str.length();

System.out.prinlnt(len);

What is the output?

Answer explanation

the length() method returns the number of characters in a String

2.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

String str = "CompSci Rocks";

int len = str.length();

System.out.prinlnt(len);

What is the output?

Answer explanation

the length() method returns the number of characters in a String

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

String str = "Hello World";

String part = str.substring(0, 1);

System.out.println(part);

What is the output?

Answer explanation

Media Image

the substring() method returns specific section of a String

4.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

String str = "CompSci Rocks";

String part = str.substring(0, 1);

System.out.println(part);

What is the output?

Answer explanation

Media Image

the substring() method returns specific section of a String

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

String str = "Hello World";

String part = str.substring(3, 4);

System.out.println(part);

What is the output?

Answer explanation

Media Image

the substring() method returns specific section of a String

6.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

String str = "CompSci Rocks";

String part = str.substring(3, 4);

System.out.println(part);

What is the output?

Answer explanation

Media Image

the substring() method returns specific section of a String

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Media Image

String str = "Hello World";

String part = str.substring(2, 7);

System.out.println(part);

What is the output?

Answer explanation

Media Image

the substring() method returns specific section of a String

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?