☰ Year plan · Communication Technology

Lists

Week 7 · Unit 1, Lesson 3 Strings and Lists in Python (2) · 3 lessons
Answers are for parents and teachers.
1
Start with numbers = [3, 6, 9]. Write the list after append(12), then remove(6), then numbers[0] = 1.
2
What happens with this code, and why?
Python
1names = ["Mona", "Sami"]
2names.remove("Adam")
Output
ValueError: the value is not in the list
3
Fill the table for the invented strings, using the four checks. Which string scores highest?
Invented stringlength 8+digitcapitalsymbolscore
"cat"00000
"Sunny2024"11103
"tree!"00011
"ABCDEFGH"10102
4
Write the steps (not code) of a program that prints the names in ["Mona", "Omar", "Salma", "Sami"] that start with O.
5
A friend wants to test the strength program with the real password of their account. What do you say?