
1 minute read
2. Strings II
Objectives
In this session, students will learn about -
● Strings
● Lower Case
● Upper Case
● Title Case
Keywords
● Strings: Are values put inside double quotes (“ ”) in the text block. These values can be words, numbers, symbols, characters, or a combination of all these
● Lower Case: Small letters like a, b, c, and so on
● Upper Case: Capital letters like A, B, C, and so on
● Title Case: The first letter of each word is in capitals like This Is Title Case
WEBS at a Glance
Recall the concepts covered in the previous coding session
Play the video given in the panel to introduce the concepts to be covered in this session
Discuss strings and types of cases that can be used with strings
Activity given in the panel Solved Examples – Q4.1 in the coding booklet
Conclude the session Assign the homework
● Instruct: Go to the Panel and open the Lab on Strings II.
● Play the video given in the panel.
● Discuss the Quiz questions given in the Panel.
● Invite answers from as many students as possible.
● Conduct Solved Example given in the Coding booklet on Page 26:
■ Say: Let’s check the length and case of our favourite movie.
■ Instruct: Click on the Assignment section.
■ Instruct: Click on the Go to Practice button to attempt the activity.
■ Walk around in the classroom and observe the activity done by the students.
■ Instruct: Click on the Yes button to submit the activity.
Note
● If time permits, conduct the additional activity given in the panel.
● Ask the following probing questions:
■ What will happen if a string is entered in all capital letters and we try to convert it to uppercase?
Possible Responses: It will remain as it is because it is already in upper case.
■ What is an empty string?
Possible Responses: Empty strings don’t have any value in them, not even a space! Their length is 0.
● Assign the following project as homework:
■ Input 2 Strings. The words of both strings should be the same but the cases should be different. Example → S1=”newt” while S2=”NEWT”. Now, compare the Strings and see if they are equal or not.
Note
● The project is optional. Assign it if feasible.