Computer Science Practice Summative Assessment Grade 10 Adv

  • Slides: 15
Download presentation
Computer Science Practice Summative Assessment Grade 10 Adv. – Term 3 Next Week Mon

Computer Science Practice Summative Assessment Grade 10 Adv. – Term 3 Next Week Mon 20/5/2019 Per. 3+4 Lubna Al Meshaiei CS teacher Um Kolthoom C 3 -Al Ain

50 marks Summative Assessment Unit 5 Unit 6 lessons lesson 1 List Pages 8

50 marks Summative Assessment Unit 5 Unit 6 lessons lesson 1 List Pages 8 - 29 lesson 2 Dictionaries 30 – 43 lesson 1 Strings 44 - 69 lesson 2 Files 56 -68

Task 1 – Open Py. Charm and type the Python code to: string 1

Task 1 – Open Py. Charm and type the Python code to: string 1 = "Today I have" string 2 = " computer science exam" string 3 = string 1 + string 2 print(string 3) print(string 3[3]*5)

lap. Brands = {"Apple": "USA", "Lenovo": "China", "HP": "USA", "Dell": "China", "Acer": "Taiwan", "LG":

lap. Brands = {"Apple": "USA", "Lenovo": "China", "HP": "USA", "Dell": "China", "Acer": "Taiwan", "LG": "South Korea"} print(lap. Brands) print(lap. Brands["HP"]) lap. Brands["Dell"] = "USA" print(lap. Brands["Dell"]) del(lap. Brands["Apple"]) lap. Brands. update({"Huawei": "China"}) print(lap. Brands. values()) print(lap. Brands. keys())

vegetables = [] finish = "n" while finish == "n": vegetable. Name = input("Enter

vegetables = [] finish = "n" while finish == "n": vegetable. Name = input("Enter the vegatable name: ") vegetables. append(vegetable. Name) finish = input("Finished? (y/n)") print(vegetables) print(len(vegetables)) print(vegetables[0: 2]) del(vegetables[1]) outfile = open("vegetables. File. txt", "w") vegetables = str(vegetables) outfile. write(vegetables) outfile. close()

cities = [] for city in range(0, 7, 1): city = input("Enter the city

cities = [] for city in range(0, 7, 1): city = input("Enter the city name: ") cities. append(city) print(cities) cities[3] = "Hong kong" outfile = open("cities. txt", "w") cities = str(cities) outfile. write(cities) outfile. close()

Task 2 – Answer the following questions. (10 marks)

Task 2 – Answer the following questions. (10 marks)

4 6 1 5 2 3

4 6 1 5 2 3