1) Using the dictionary and answer the questions: capitals={"Peru":"Lima","UAE":"Abu Dhabi","Zambia":"Lusaka", "Germany":"Berlin","Portugal":"Lisbon","China":"Beijing", "Jordan":"Cairo"}..How can you print the capitals dictionary? a) print(capitals["Jordan"]) b) capitals["Jordan"]="Amman" c) print(capitals) 2) Using the dictionary and answer the questions: capitals={"Peru":"Lima","UAE":"Abu Dhabi","Zambia":"Lusaka", "Germany":"Berlin","Portugal":"Lisbon","China":"Beijing", "Jordan":"Cairo"}..Write down the statement to check the value of Jordan(the key). a) print(capitals["Jordan"]) b) capitals["Jordan"]="Amman" c) print(capitals) 3) Using the dictionary and answer the questions: capitals={"Peru":"Lima","UAE":"Abu Dhabi","Zambia":"Lusaka", "Germany":"Berlin","Portugal":"Lisbon","China":"Beijing", "Jordan":"Cairo"}..The entry for the capital of Jordan is wrong. Write the statement to change it. a) print(capitals["Jordan"]) b) capitals["Jordan"]="Amman" c) print(capitals) 4) Using the dictionary and answer the questions: capitals={"Peru":"Lima","UAE":"Abu Dhabi","Zambia":"Lusaka", "Germany":"Berlin","Portugal":"Lisbon","China":"Beijing", "Jordan":"Cairo"}..Write the statement to print the capitals for the UAE and China (choose 2 answers) a) print(capitals["Jordan"]) b) print(capitals["UAE"]) c) print(capitals["China"]) d) print(capitals["Germany"]) 5) Create a dictionary to store values for the following keys:name,age,gender and class. a) Info=("Mohamed","14","M","9") b) Info=["Mohamed","14","M","9"] c) Info={"name":"Mohamed","age":"14","gender":"M","class":"9"} d) Info={"name","age","gender","class"} 6) Info={"name":"Mohamed","age":"14","gender":"M","class":"9"} .. Change the age in your dictionary a) Info["name"]=13 b) Info=["13"] c) Info["age"]=13 7) Info={"name":"Mohamed","age":"14","gender":"M","class":"9"}. What statement would you use to check and print the name in your dictionary? a) print(Info["name"]) b) print(Info["age"]) c) print(Info["gender"])
0%
G9-S3-W5-L2-Activity
Jaga
looja
Lateefaa
علوم الكمبيوتر
Redigeeri sisu
Manusta
Veel
Edetabel
Näita rohkem
Näita vähem
See edetabel on praegu privaatne. Selle avalikustamiseks klõpsake käsul
Jaga
.
Materjali omanik on selle edetabeli keelanud.
See edetabel on keelatud, kuna teie valikud erinevad materjali omaniku omadest.
Taasta valikud
Viktoriin
on avatud mall. Sellega ei saa edetabeli punkte.
Sisselogimine on nõutud
Visuaalne stiil
Fondid
Vajalik tellimus
Valikud
Vaheta malli
Näita kõike
Tegevust mängides kuvatakse rohkem vorminguid.
Avatud tulemused
Kopeeri link
QR-kood
Kustuta
Kas taastada automaatselt salvestatud
?