Page 129 - Code_GPT_Class_8
P. 129
b. country='Australia'
print(country.upper())
print(country.lower())
print(len(country))
print(country.capitalize())
3. Competency-based/application-based questions:
a. Neha and her cousins are 17 and 23 years old respectively. They have been arguing
continuously about their voting rights, so they decided to write a python function
which gives a message whether you are eligible to vote or not. (if above 18 years
eligible to vote else not). Write a program for them.
b. Mihika is given a task of finding average marks of all students in her class based on English, Maths,
Science and Social Science. Help her write a function Avg() which takes in values as students’ four
subject marks, calculates the average and return it to function call.
SDG Activity
Design a simple computer network to track and monitor waste production and recycling
in your school. Create a program that collects data from different classrooms, displays
yearly wastage and suggests ways to reduce it.
Explore in the Lab 21 st Century #Technology Literacy
Skills
To
Subject Programming using functions
1. Write a program to find the length of name entered by your friend.
2. Write a python function to convert Fahrenheit into Celsius.
For The Teacher
Demonstrate the creation of functions to the students.
Explain string in detail to the students.
Functions and String in Python 127

