Lesson 1 of 0
In Progress

Session 9: Working with Strings

Objectives

After this lesson, students will be able to:

  • Understand the way Python stores and uses strings.
  • Describe the way strings are traversed with a loop.
  • Compare strings and substrings.
  • Understanding string functions.
  • Prepare a coding project on palindrome string.
Introduction

In this session, students will be learning about the string basics, different string operations which can be performed in python and various string functions available in python.

Students are given introduction about the concept of strings in python. They are then taught about basics of strings. Different operations that can be performed with the strings in python. Students are given introduction about the various string functions available in python and briefed about each of their’s functionality. Finally, we give them a step-by-step guide to make a project in Pictoblox to decide whether a given string is palindrome or not.

 

Activity
  • Creating a project which displays whether a given string is palindrome or not.

Teaching Resources
PicoBlox Code
TitleDescriptionFile
Palindrome stringThe project demonstrates how to decide whether a given string is palindrome or not.https://learn.edustream.ae/wp-content/uploads/2022/06/CL9_CH9_Palindrome-String.sb3
Timeline
TitleApproximate DurationProcedureReference Material
String Basics5
  1. Access and play the String Basics Lecture Slide.
  2. Explain about strings in python.
  3. Describe about traversing a string using for loop and while loop.

Lecture Slide

String functions10
  1. Discuss about different string operations which can be performed in python.
  2. Explain about various string methods and built-in functions available in python.

Lecture Slide

Activity : Palindrome string20
  1. Ask students to open the PictoBlox on their computer.
  2. Demonstrate the procedure given in the Palindrome string Activity Sheet to the students.
  3. Ask the students to follow the instructions to create the project.
  4. At the end of the activity, the teacher must check if all the students have created the project and provide feedback accordingly.

PictoBlox file, Lecture Slide and Activity sheet

Concluding the lecture5
  1. Make sure that all the students save their script properly before closing PictoBlox.
  2. Give a summary of the points covered in the lecture.

Lecture Slide

Things to Remember
Before Class
  1. Make sure each PC has the latest version of PictoBlox installed and running.
During Class
  1. Make sure they write the script by selecting the appropriate sprite.
  2. Make sure they use the right palettes of Pictoblox Python interface for different functions while writing the code.
After Class
  1. Make sure students save their codes/scripts.
  2. Make sure they shut down the PC/Laptops.