Answered step by step
Verified Expert Solution
Question
1 Approved Answer
NOTE: Solve Using Python YOU CANNOT USE ANY BUILT - IN FUNCTION EXCEPT len IN PYTHON. [ negative indexing, append is prohibited ] You can
NOTE: Solve Using Python
YOU CANNOT USE ANY BUILTIN FUNCTION EXCEPT len IN
PYTHON. negative indexing, append is prohibited
You can use the attribute shape of numpy arrays
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 here is the code : def playgamearena:
#TO DO
arenanparray
printmatrixarena
playgamearena
#This should print
#Points Gained: Your team is out.
print
arenanparray
printmatrixarena
playgamearena
#This should print
#Points Gained: Your team has survived the game. Do in this provide code.. Here is The Question: Game Arena:
Suppose you and your friends are in the world of 'Alice in Borderland' where
you decided to take part in a game and entered the game arena. As a team,
you need to gain at least points in order to keep surviving in the
borderland. Otherwise, you will be out of the game and your team will be
banished for good. Now, the arena has a D array like structure where players
of a team are given certain positions with values that are multiples of By
staying in these positions, every player can gain points from the cells above,
below, left and right not diagonally only if those cells contain The cells
containing and are to be avoided For each player, add from these cells
containing to your total points for the team to keep on surviving in
borderland. Be careful about corner cases. Your task is to write a method
which tells us whether your team is out or has survived the game.
Explanation:
Player with value has in the cell above, cell below and the right cell cells
Player with value has in the cell above and the cell below cells Player with
value has in the above cell and right cell cells So in total, they gained
points and survived the game.
Note: For the cell with value that is common between players in position both
gained points each, so it's not like if one player already added those points, another
player cannot.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started