- 1

Last task in dictionary section

Hi guys i need a little push. The last task in dictionaries section, don’t really understand how .get() works with 7 and 5. I worked out the correct answer in Python but really don’t get how the number 5 works there. 7 isn’t there but what’s 5? fib = {1:1, 2:1, 3:2, 4:3} print(fib.get(4,0) + fib.get(7,5)) Can anyone help me ?

10th Jul 2020, 3:08 PM
Radek Kapucian
Radek Kapucian - avatar
1 Answer
0
well 7 isn’t there so it does nothing, but 5 isn’t there either but has value. Maybe i’m just looking into it for too long and missing some basics
10th Jul 2020, 4:14 PM
Radek Kapucian
Radek Kapucian - avatar