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
Bagikan
oleh
Lateefaa
علوم الكمبيوتر
Edit Konten
Menyematkan
Tambah
Papan Peringkat
Tampilkan lainnya
Tampilkan lebih sedikit
Papan peringkat ini saat ini bersifat pribadi. Klik
Share
untuk menjadikannya publik.
Papan peringkat ini telah dinonaktifkan oleh pemilik sumber daya.
Papan peringkat ini dinonaktifkan karena opsi Anda berbeda dengan pemilik sumber daya.
Opsi Pemulihan
Kuis
adalah templat terbuka. Ini tidak menghasilkan skor untuk papan peringkat.
Diperlukan login
Gaya visual
Font
Diperlukan langganan
Pilihan
Berganti templat
Tampilkan semua
Format lainnya akan muncul saat Anda memainkan aktivitas.
Buka hasil
Salin tautan
Kode QR
Hapus
Pulihkan simpan otomatis:
?