You are no longer permitted to choose your own seat on the new campus of BRACU. You must…
- User
You are no longer permitted to choose your own seat on the new campus of BRACU. You must abide by the new regulations, which state that if you sit in the first row for the first week, you must shift to the second row for Week2, the third row for the week3, and so on. In your classroom, there are a total of 6 rows and 5 columns. Your friend “AA” wants to know from you that on the upcoming exam week in which row he will be in. Your task is to implement a function row_rotation(exam_week, seat_status) that takes the exam_week and a 2D array of current seat status as input and returns the row number in which your friend “AA” will be seated and print the seat status for that week.
Input: exam_week = 3 current_seat_status= A B C D E F G H I J K L M N O P Q R S T U V W X Y Z AA BB CC DD
Output: U V W X Y Z AA BB CC DD A B C D E F G H I J K L M N O P Q R S T
here,Your friend AA will be on row 2.
Explanation: exam is 3 week away from the current week Current seat status of above input is for this week.
Seat Status of Next week: Z AA BB CC DD A B C D E F G H I J K L M N O P Q R S T U V W X Y
Seat Status of Exam week:
U V W X Y Z AA BB CC DD A B C D E F G H I J K L M N O P Q R S T
NOTE:
YOU CANNOT USE ANY BUILT-IN FUNCTION EXCEPT len IN PYTHON. [negative indexing, append is prohibited]
YOU HAVE TO MENTION SIZE OF ARRAY WHILE INITIALIZATION
YOUR CODE SHOULD WORK FOR ANY VALID INPUTS. [Make changes to the Sample Inputs and check whether your program works correctly]
Use Numpy array to initialize the array. You are allowed to use the shape parameter of the numpy array as well.
DO NOT USE DICTIONARY
- Assistant