Page 126 - Trackpad_V2.1_class8
P. 126
21 st #Critical Thinking
LAB ACTIVITY Century #Technology Literacy
Skills
Visit your computer lab and perform the following actions:
In the list given below, only display numbers that are divisible by 4. If there is a number greater
than 100, then stop the loop iteration.
list = [8, 13, 16, 24, 35, 50, 60, 72, 75, 100, 120, 160]
Write a program that counts the total number of digits in the number 542892 and displays it as
output.
Print the items of the given list in reverse order. list = [25, 35, 45, 55, 65, 75]
Write a Python program to take your name as input and make the first and the last letter of your
name uppercase and let the other letters remain lowercase.
COding Zone COding Zone {} = COding Zone COding Zone
{C ding z ne}
21 st
#Critical Thinking
[]
Century
#Technology Literacy
Skills
</>
Find errors in the code of the programs given below, correct them and write the output.
1. str = "Orange Education"
count = 0
for i in str;
if( i=='A' or i=='a' or i=='E' or i=='e'
or i=='I' or i=='i' or i=='O' or i=='o'
or i=='U' or i=='u'):
count += 1;
print("Total vowels are: " count)
2. total: 0
list1 = [25, 15, 10, 5]
for ele in range[0, len(list1)):
total = total + list1[ele]
print(“Sum of all elements in given list: ”, total)
CAREER HERE
People who are experts in Python may pursue their career as Software Developers.
FOR THE TEACHER
1. Give demonstration of creating functions to the students.
2. Explain List and String in detail to the students.
124 Trackpad (V2.1)-VIII

