String Methods Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

“Hello World”.upcase

A

“HELLO WORLD”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

“Hello World”.reverse

A

“dlroW olleH”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

“Hello World”.downcase

A

“hello world”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

“Hello World”.capitalize

A

“Hello world”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

“Hello World”.swapcase

A

“hELLO wORLD”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

“Hello World” += “s”

A

“Hello Worlds”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

“Hello World”.split(“ “)

A

[“Hello”, “World”]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How would you make “Hello World” look like the following?

“HELLO WORLD”

A

“Hello World”.upcase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How would you make “Hello World” look like the following?

“dlroW olleH”

A

“Hello World”.reverse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How would you make “Hello World” look like the following?

“hello world”

A

“Hello World”.downcase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How would you make “Hello World” look like the following?

“Hello world”

A

“Hello World”.capitalize

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How would you make “Hello World” look like the following?

“hELLO wORLD”

A

“Hello World”.swapcase

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How would you make “Hello World” look like the following?

“Hello Worlds”

A

“Hello World” += “s”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How would you make “Hello World” look like the following?

[“Hello”, “World”]

A

“Hello World”.split(“ “)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly