Search Header Logo

String Quiz

Authored by Jakobi Gorham

Computers

9th - 12th Grade

Used 39+ times

String Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which method can be used to remove any whitespace from both the beginning and the end of a string?

trim()

strip()

len()

replace()

2.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is a correct syntax to return the first character in a string?

x = "Hello"[0]

x = sub("Hello", 0, 1)

x = "Hello".sub(0, 1)

All of the above

3.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What is the correct syntax to output the type of a variable or object in Python?

print(typeof(x))

print(typeOf(x))

print(type(x))

print(typeof x)

4.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which one does take you to next line?

\t

\n

\'

5.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Print output.

x=”CHAMPION”

print(x[5])

C

A

I

P

6.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

Which method can be used to calculate length of list:

len()

string()

count()

remove()

7.

MULTIPLE CHOICE QUESTION

30 sec • 5 pts

What in programming language are like something which gets active or gets task done when called

Functions

Set

Tuple

Dictionary

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?