03 (6): Consider the code below and indicate what fun (N) calculates. Explain briefly the code logic, and especially wha
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
03 (6): Consider the code below and indicate what fun (N) calculates. Explain briefly the code logic, and especially wha
03 (6): Consider the code below and indicate what fun (N) calculates. Explain briefly the code logic, and especially what each step of reduce does exactly. Trace the example of fun (6) to illustrate your answer in detail. (1 mark) fun = lambda n: reduce(lambda x,n: (x[1], x[0]+x[1]). range(n), (0,1)) [@]
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!