Strings, Strings, Strings

Strings, Strings, Strings

9th - 12th Grade

22 Qs

quiz-placeholder

Similar activities

JAVA string

JAVA string

12th Grade

20 Qs

Python Strings

Python Strings

12th Grade

20 Qs

Python

Python

11th Grade

20 Qs

Strings + Revision

Strings + Revision

9th - 10th Grade

18 Qs

Strings

Strings

10th Grade

17 Qs

Review String

Review String

9th - 12th Grade

21 Qs

Python year 9

Python year 9

8th - 11th Grade

20 Qs

Strings in python -1

Strings in python -1

11th Grade

22 Qs

Strings, Strings, Strings

Strings, Strings, Strings

Assessment

Quiz

Computers

9th - 12th Grade

Hard

Created by

Jennifer Brockman

Used 11+ times

FREE Resource

22 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following expressions will result in “crying”?

Let sentence = "There's no crying in baseball"

print(sentence[10:16])

print(sentence[11:17])

print(sentence[11:16])

print(sentence[10:17])

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following expressions will print “phone”?

Let sentence = "E.T. phone home"

print(sentence[4:9])

print(sentence[4:10])

print(sentence[5:9])

print(sentence[5:10])

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following expressions will print “N”?

word = "MONEY"

print(word[3])

print(word[2])

print(word[4])

print(word[1])

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following string operation is illegal? Assume that word = "goose".


word[0] = "M"

word = word[2] + word[-1]

word = "moose"

word = word + "aloose"

5.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Write 2 expressions that will each get the last character in a string. Assume that word is a string variable. Separate the commands with "and".

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

What is the output of the program?

Media Image
Media Image
Media Image

This program will cause an error.

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following if statements checks if the string variable quote contains the word “big”?

Media Image
Media Image
Media Image
Media Image

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?