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
Deli
ustvaril/-a
Lateefaa
علوم الكمبيوتر
Uredi vsebino
Vdelaj
Več
Lestvica vodilnih
Prikaži več
Prikaži manj
Ta lestvica je trenutno zasebna. Kliknite
Deli
, da jo objavite.
Lastnik vira je onemogočil to lestvico vodilnih.
Ta lestvica vodilnih je onemogočena, ker se vaše možnosti razlikujejo od možnosti lastnika vira.
Možnosti za vrnitev
Kviz
je odprta predloga. Ne ustvarja rezultatov za lestvico vodilnih.
Potrebna je prijava
Vizualni slog
Pisave
Zahtevana je naročnina
Možnosti
Preklopi predlogo
Pokaži vse
Med igranjem dejavnosti se bo prikazalo več oblik zapisa.
Odprti rezultati
Kopiraj povezavo
QR koda
Izbriši
Obnovi samodejno shranjeno:
?