Last task in dictionary section | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 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 Resposta
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