You are on page 1of 2

Step Variable/Action Value

Define dictionary {"film_capture": 4360, "Gelle_sSpot": 240000,


1
org_contributions "Harvey's_Construction": 3940000}

sorted_orgs = [("Harvey's_Construction", 3940000),


2 Sort the dictionary by value
("Gelle_sSpot", 240000), ("film_capture", 4360)]

3 For each item in sorted_orgs:

Assign org to first item in


4 org = "Harvey's_Construction"
tuple

Assign contrib to second


5 contrib = 3940000
item

6 Print org and contrib "Harvey's_Construction" 3940000

7 For each item in sorted_orgs:

Assign org to first item in


8 org = "Gelle_sSpot"
tuple

Assign contrib to second


9 contrib = 240000
item

10 Print org and contrib "Gelle_sSpot" 240000

11 For each item in sorted_orgs:


Assign org to first item in
12 org = "film_capture"
tuple

Assign contrib to second


13 contrib = 4360
item

14 Print org and contrib "film_capture" 4360

You might also like