Page 200 - AI Ver 3.0 Class 11
P. 200
Task #Coding & Computational Thinking
Write Python programs for the following:
1. Write a Python program to accept a string. Display the length of each word in the string.
2. Display all even numbers between 20 and 80.
3.• Assume a list of 10 numbers. Display:
a. Count of even numbers
b. Count of odd numbers
c. Sum of all even numbers
d. Sum of all odd numbers
e. Count all numbers divisible by 10
4. Create a dictionary named student with keys "name", "age", and "grade", and assign appropriate values to
them. Now write Python code to do the following:
a. Change the value of grade from “A” to “A+”
b. Display the value of age
c. Add another key-value pair to the dictionary – “subject” : “Computer Science”
d. Display the dictionary
198 Touchpad Artificial Intelligence (Ver. 3.0)-XI

