Page 244 - Robotics and AI class 10
P. 244
#Experiential Learning
Class Activity
1. Write a Python program to remove words from a given list of strings containing a character or string.
Original list: list1: 'Purple color', 'Orange', 'Black', 'Orange @', 'Pink'
Character list: ['#', 'color', '@']
New list: ['Purple', 'Black', 'Orange', 'White']
2. Write a Python program to find the item with maximum occurrences in a given list.
Original list: [2, 3, 9, 4, 7, 9, 8, 2, 6, 5, 1, 6, 1, 2, 3, 4, 6, 9, 1, 2]
Item with maximum occurrences of the said list: 2
3. Write a Python program to traverse a string 'PYTHON' using for loop.
4. Write a Python program to convert the string "orange education" to uppercace.
Answers
Exercise (Section A)
A. 1. b. 2. a. 3. b. 4. d. 5. c. 6. a. 7. b. 8. b. 9. c. 10. d.
11. a.
B. 1. program 2. interpreter 3. arithmetic 4. heterogeneous 5. mutable 6. Forward Indexing
7. Markers 8. tail(n) 9. positional 10. // 11. mathematical 12. Vector
D. 1. True 2. False 3. False 4. True 5. True 6. False
7. True 8. False 9. True
E. 1. d. 2. a. 3. e. 4. c. 5. c. 6. b.
242 Touchpad Robotics & Artificial Intelligence-X

