
String Index Quiz
Authored by EMMA RIEMENSCHNEIDER
Other
9th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the index of the first character in a string?
1
-1
0
null
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you access the last character in a string using index?
-1
2
1
0
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which string method can be used to find the index of a specific character in a string?
find()
search()
locate()
indexOf()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is substring(1) of the String 'hello' ?
hello
llo
o
ello
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you access a range of characters in a string using index?
By using the split() method
To access a range of characters in a string using index, you can use slicing.
By using the join() method
By using the replace() method
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is substring(-1) of the String 'world' ?
d
r
o
w
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is substring(2,4) of the String 'python' ?
on
th
py
yt
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?