(2.7) String Methods

(2.7) String Methods

12th Grade

20 Qs

quiz-placeholder

Similar activities

Python Easy

Python Easy

9th - 12th Grade

20 Qs

Homework: Lists, Strings, Variables

Homework: Lists, Strings, Variables

9th - 12th Grade

17 Qs

AP CSA Review 1 / - 3-27

AP CSA Review 1 / - 3-27

9th - 12th Grade

20 Qs

Python Quiz (part 1)

Python Quiz (part 1)

9th - 12th Grade

20 Qs

แบบทดสอบ Python เบื้องต้น

แบบทดสอบ Python เบื้องต้น

9th - 12th Grade

20 Qs

Misconceptions Check

Misconceptions Check

9th - 12th Grade

15 Qs

konversi antar tipe data bahasa pascal

konversi antar tipe data bahasa pascal

12th Grade

20 Qs

Python for Beginners

Python for Beginners

9th - 12th Grade

20 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?