Search Header Logo
Strings Manipulation - Case Conversion

Strings Manipulation - Case Conversion

Assessment

Presentation

Computers

8th Grade

Practice Problem

Easy

Created by

M Dwedari

Used 17+ times

FREE Resource

7 Slides • 14 Questions

1

Login using ONLY your first name

Irrelevant and silly names will be removed

If there is, in this class, another student has the same first name, add the first letter of your surname

2

Lesson Objectives

  • Explore multiple case conversion functions

    (upper(), lower(), title(), capitalize(), and swapcase()

  • Using multiple case conversion functions

    (upper(), lower(), title(), capitalize(), and swapcase()

​Strings Manipulation

3

Poll

Question image

Predict...

What will be the output of this code?

Error

The student's first name is sophie

The student's first name is SOPHIE

The student's first name is Sophie

4

Test the code in Thonny (3-minutes)

media
  1. ​Open Thonny

  2. Type the code in Thonny

  3. Save the code to your OneDrive

  4. Run/execute the code If you have completed the task early.

  5. Ask your teacher for extension task

5

Multiple Choice

Question image

Now, you have tested the code in Thonny.

What has this code displayed in the shell?

1

Error

2

The student's first name is sophie

3

The student's first name is SOPHIE

4

The student's first name is Sophie

6

Poll

Question image

Predict...

What will be the output of this code?

Error

The student's first name is jimmy

The student's first name is Jimmy

The student's first name is students lower

7

Test the code in Thonny (3-minutes)

media
  1. ​Open Thonny

  2. Type the code in Thonny

  3. Save the code to your OneDrive

  4. Run/execute the code

  5. If you have completed the task early.

  6. Ask your teacher for extension task

8

Multiple Choice

Question image

Now, you have tested the code in Thonny.

What has this code displayed in the shell?

1

Error

2

The student's first name is jimmy

3

The student's first name is Jimmy

4

The student's first name is students lower

9

Poll

Question image

Predict...

What will be the output of this code?

Error

The student's first name is OLIVER JOHNS

The student's first name is Oliver johns

The student's first name is STUDENT

The student's first name is Oliver Johns

10

Test the code in Thonny (3-minutes)

media
  1. ​​Open Thonny

  2. Type the code in Thonny

  3. Save the code to your OneDrive

  4. Run/execute the code

  5. If you have completed the task early. Ask your teacher for extension task

11

Multiple Choice

Question image

Now, you have tested the code in Thonny.

What has this code displayed in the shell?

1

The student's first name is Oliver Johns

2

The student's first name is OLIVER JOHNS

3

The student's first name is Oliver johns

4

The student's first name is STUDENT

12

Poll

Question image

Predict...

What will be the output of this code?

Error

The student's first name is OLIVER JOHNS

The student's first name is Oliver Johns

The student's first name is STUDENT

13

Test the code in Thonny (3-minutes)

media
  1. ​​Open Thonny

  2. Type the code in Thonny

  3. Save the code to your OneDrive

  4. Run/execute the code

  5. If you have completed the task early. Ask your teacher for extension task

14

Multiple Choice

Question image

Now, you have tested the code in Thonny.

What has this code displayed in the shell?

1

Error

2

The student's first name is OLIVER JOHNS

3

The student's first name is Oliver Johns

4

The student's first name is STUDENT

15

Poll

Question image

Predict...

What will be the output of this code?

Students Name: jIMMY jOHNS

Error

Students Name: student swapcase

Students Name: Jimmy Johns

16

Test the code in Thonny (3-minutes)

media
  1. ​​Open Thonny

  2. Type the code in Thonny

  3. Save the code to your OneDrive

  4. Run/execute the code

  5. If you have completed the task early. Ask your teacher for extension task

17

Multiple Choice

Question image

Now, you have tested the code in Thonny.

What has this code displayed in the shell?

1

Students Name: jIMMY jOHNS

2

Error

3

Students Name: student swapcase

4

Students Name: Jimmy Johns

18

Multiple Choice

I want all the letters to be converted to uppercase. Which function should I use?

1

variable.upper()

2

variable.capitalize()

3

variable.title()

19

Multiple Choice

I want all the letters to be converted to lowercase. Which function should I use?

1

variable.upper()

2

variable.lower()

3

variable.swapcase()

20

Multiple Choice

I want ONLY the first letter to be converted to an uppercase one. Which function should I use?

1

variable.upper()

2

variable.capitalize()

3

variable.title()

21

Multiple Choice

I want to capitalise the first letter of each word. Which function should I use?

1

variable.lower()

2

variable.capitalize()

3

variable.title()

4

variable.upper()

Login using ONLY your first name

Irrelevant and silly names will be removed

If there is, in this class, another student has the same first name, add the first letter of your surname

Show answer

Auto Play

Slide 1 / 21

SLIDE