Page 122 - TP_Play_V2.2_Class8
P. 122
Program 9: To use various string built-in functions
Program3.py
File Edit Format Run Options Window Help
str = 'Hello'
print(len(str))
print('Hello'.lower())
print('hello'.upper())
print('hello'.capitalize())
Output
5
hello
HELLO
Hello
Double Tap Century #Information Literacy
21 st
Skills
1. What is a string?
2. What are escape sequences?
Interdisciplinary Learning
#English
Create a program in Python to display a stanza of a poem from your English course book. Use various
string built-in functions to capitalise the first letter of each line of the poem.
#Lab Activity
SOME MORE PROGRAMS
Program 10: To calculate the area of different shapes
120 Plus (Ver. 4.0)-VIII

