- 03 6 Consider The Code Below And Indicate What Fun N Calculates Explain Briefly The Code Logic And Especially Wha 1 (50.4 KiB) Viewed 36 times
03 (6): Consider the code below and indicate what fun (N) calculates. Explain briefly the code logic, and especially wha
-
- Site Admin
- Posts: 899603
- 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)) [@]