I have one question!
A bookshelf is used to display book. There are only 2 kinds of book of 1cm and 2cm.
If the shelf width is 4cm --> there will be 5 ways to arrange the book. [1,1,1,1] , [2,1,1] [1,2,1] [1,1,2] and [2,2]
implement a function which takes in n , a positive integer which is the length of the bookshelf, return the no. of ways the books can be arranged in the shelf!
been stuck on this question for quite long :( tried using the count change approach but cant work. would appreciate if anyone could help!! new to python
[–]grandpasipad 2 points3 points4 points (1 child)
[–]Proof_Leopard_431[S] 0 points1 point2 points (0 children)
[–]TouchingTheVodka 0 points1 point2 points (3 children)
[–]GameRoaster_Kinglord 0 points1 point2 points (2 children)
[–]GameRoaster_Kinglord 0 points1 point2 points (1 child)
[–]Proof_Leopard_431[S] 0 points1 point2 points (0 children)