+ 1
Why the answer is 8 đ€
fib={1:1,2:1,3:2,4:3} print(fib.get(4,0)+fib.get(7,5))
3 Answers
+ 5
read this :
https://www.w3schools.com/JUMP_LINK__&&__python__&&__JUMP_LINK/ref_dictionary_get.asp
hint : 3+5 = 8
+ 3
try separating the print into
print(fib.get(4,0))
print(fib.get(7,5))
since 4 is in fib it will print 3 instead of 0
since 7 is not in fib, it will print 5.
3 + 5 = 8