You can use this assignment in your class!
Mastery Progress(100.0%)
i

Collections in Python Assignment

You answeredJUST NOW
Python
You passed all test cases!
STDIN
4
name:John
age:35
occupation:bar tender
kids:3
Expected STDOUT
{'name': 'John', 'age': '35', 'occupation': 'bar tender', 'kids': '3'}
Your STDOUT
{'name': 'John', 'age': '35', 'occupation': 'bar tender', 'kids': '3'}
STDIN
1
first_key:first_val
Expected STDOUT
{'first_key': 'first_val'}
Your STDOUT
{'first_key': 'first_val'}
STDIN
0
Expected STDOUT
{}
Your STDOUT
{}
STDIN
7
1:a
2:b
3:c
4:d
5:e
6:f
7:g
Expected STDOUT
{'1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e', '6': 'f', '7': 'g'}
Your STDOUT
{'1': 'a', '2': 'b', '3': 'c', '4': 'd', '5': 'e', '6': 'f', '7': 'g'}

Did you like this question?

(Voting helps us personalize your learning experience!)
imgInstructor solution
Alec KretchJAN 18, 2021, 12:57:18 PM
Python

Was this helpful?

(Voting helps us personalize your learning experience!)
imgCollections in Python Presentation (pages 7, 8)

Was this helpful?

(Voting helps us personalize your learning experience!)
Think you've got it?
Select one of the following options:
  • A.
  • B.
  • C.
  • D.
Submit answer

Was this helpful?

(Voting helps us personalize your learning experience!)

You may exit out of this review and return later without penalty.