
dict quiy
Authored by mwdh8ch2x9 apple_user
Science
1st - 5th Grade
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Mi a kimenete a következő kódnak?
my_dict = {"a": 1, "b": 2, "c": 3}
print(len(my_dict))
6
3
hiba
1
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Melyik kód adna hozzá egy új kulcs-érték párt a my_dict nevű szótárhoz, ahol a kulcs "d" és az érték 4?
my_dict = {"a": 1, "b": 2}
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Mi történik, ha egy nem létező kulcsot próbálunk elérni egy szótárban?
my_dict = {"apple": "red", "banana": "yellow"}
print(my_dict["grape"])
Visszaadja a None értéket.
Hibaüzenetet (KeyError) dob.
Hozzáadja a "grape" kulcsot None értékkel.
Visszaad egy üres stringet.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Melyik metódus adja vissza egy szótár összes kulcsát?
values()
items()
keys()
get_keys()get_keys()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
my_dict = {"x": 10, "y": 20, "z": 30}
for key, value in my_dict.items():
print(f"{key}: {value}")
x: 10
y: 20
z: 30
x
y
z
10
20
30
hiba
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Hogyan lehet törölni a "banana" kulcsot és a hozzá tartozó értéket a következő szótárból?
fruits = {"apple": 1, "banana": 2, "orange": 3}
fruits.remove("banana")
del fruits["banana"]
fruits.delete("banana")
fruits.pop_key("banana")
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Melyik állítás igaz a Python szótárak kulcsaira vonatkozóan?
A kulcsoknak egyedinek kell lenniük.
A kulcsoknak módosíthatónak kell lenniük (mutable).
A kulcsok csak stringek lehetnek.
A kulcsok tetszőleges számú értéket tárolhatnak
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
9 questions
Properties of Solid and Liquid - FA # 2 Part 1
Quiz
•
2nd Grade
10 questions
WHO ARE THEY
Quiz
•
1st Grade
12 questions
SCI Review
Quiz
•
1st Grade
15 questions
4.L.2.1 Food and Non-food Groups
Quiz
•
4th Grade
10 questions
Our Sense Organs
Quiz
•
1st Grade
15 questions
Science Quiz 2 Week of 4-15
Quiz
•
5th Grade
7 questions
9. It's Raining EVS online MCQ game Class III, Mr. GAJANAN
Quiz
•
3rd Grade
12 questions
Science Week 11 - Human Impact on Habitats
Quiz
•
3rd Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
10 questions
Probability Practice
Quiz
•
4th Grade
15 questions
Probability on Number LIne
Quiz
•
4th Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
6 questions
Appropriate Chromebook Usage
Lesson
•
7th Grade
10 questions
Greek Bases tele and phon
Quiz
•
6th - 8th Grade
Discover more resources for Science
15 questions
Earthly Ecosystems Unit Review
Quiz
•
3rd Grade
20 questions
Weathering, Erosion, Deposition
Quiz
•
5th Grade
22 questions
Ancient Greece
Quiz
•
3rd Grade
15 questions
Physical and Chemical Changes
Quiz
•
4th Grade
20 questions
Food Chains and Food Webs Review
Quiz
•
5th Grade
28 questions
4th Grade The Need for Speed
Quiz
•
3rd - 5th Grade
20 questions
The Water Cycle
Quiz
•
4th - 5th Grade
20 questions
Food Webs
Quiz
•
5th Grade