Week 7: Monday -------------- Q1. (30) Consider an n-digit positive integerr k. Square it and add the right n digits to the left n or n-1 digits. If the resultant sum of either is k, then k is called a Kaprekar number. For example, 9 is a Kaprekar number since 9^2=81 and 8+1=9. 297 is a Kaprekar number since 297^2=88209 and 88+209=297. Notice that 882+209 is not equal to 297 but since 88+209 is, 297 is a Kaprekar number. 31 is not a Kaprekar number as 31^2=961 and neither 61+9 or 61+96 is equal to 31. Write a function that tests whether a positive integer is a Kaprekar number. Write a program that prints all Kaprekar numbers in the range 1 to 999. Q2. (70) There is a 20x2 sized board. There are a n pieces of 2x1 sized blocks available. We need to fill the board with these blocks. Write a program to calculate the number of ways in which the board can be filled with these blocks. (You may use recursion to solve it. You can do it in your way as well.)