Mastering String Manipulation

Mastering String Manipulation

University

15 Qs

quiz-placeholder

Similar activities

JAVA I/O

JAVA I/O

University

10 Qs

OOPJ_LAB_Viva_Strings

OOPJ_LAB_Viva_Strings

University

20 Qs

Intro Quiz

Intro Quiz

University

10 Qs

Java

Java

University

11 Qs

Launchpad programming - day 5 morning (JS)

Launchpad programming - day 5 morning (JS)

University

10 Qs

SKIP1103 TOPIC 2: PREDEFINED CLASS

SKIP1103 TOPIC 2: PREDEFINED CLASS

University

10 Qs

JavaScript String Methods

JavaScript String Methods

12th Grade - Professional Development

15 Qs

IOTA : Web Development Bootcamp Quiz 3

IOTA : Web Development Bootcamp Quiz 3

University

10 Qs

Mastering String Manipulation

Mastering String Manipulation

Assessment

Quiz

Computers

University

Medium

Created by

Udayveer Singh

Used 1+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of 'Hello'.length?

Hello World

6

4

5

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you convert a string to lowercase in JavaScript?

string.convertToLower()

string.toLowerCase()

string.toLower()

string.lowercase()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What method would you use to find the index of a character in a string?

Use the 'locate' method.

Use the 'find' method.

Use the 'search' method.

Use the 'indexOf' method.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How can you concatenate two strings in Python?

string1.append(string2)

string1 & string2

string1 + string2

string1.concat(string2)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the 'strip()' method do in Python?

The 'strip()' method removes leading and trailing whitespace from a string.

The 'strip()' method splits a string into a list of words.

The 'strip()' method converts a string to uppercase.

The 'strip()' method adds whitespace to a string.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you check if a string contains a substring in Java?

Check the length of the string and substring for equality.

Use the 'indexOf' method: string.indexOf(substring) > -1.

Use the 'contains' method: string.contains(substring).

Use a regular expression: string.matches(substring)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of 'abc'.replace('a', 'z')?

zbc

abc

zab

bbc

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?