Question: Q8 - Multiple Bots (0.75 points) Let's create a larger board with multiple bots exploring at the same time! a) List of bots Create a

 Q8 - Multiple Bots (0.75 points) Let's create a larger boardwith multiple bots exploring at the same time! a) List of bots

Q8 - Multiple Bots (0.75 points) Let's create a larger board with multiple bots exploring at the same time! a) List of bots Create a list bots_list that contains three distinct WanderBot instances. Each WanderBot in bots_list will have a different shape, specified with the value passed into the character attribute. The first WanderBot in bots_list should take the character input value 1078. The second: 1127. The third: 1279. In [ ]: 1 # YOUR CODE HERE raise NotImplementedError() In [ ]: assert isinstance (bots_list, list) assert len(bots_list) == 3 In [ ]: i assert bots_list[0].character == assert bots_list[1].character == assert bots_list[2].character == A b) Create grid and play_board Step 1: Assign two variables 1. grid_n should be assigned the integer 15 2. iter_n should be assigned the integer 25 b) Create grid and play_board Step 1: Assign two variables 1. grid_n should be assigned the integer 15 2. iter_n should be assigned the integer 25 Step 2: Call play_board Call play_board() with the following inputs for the parameters in play_board : o bots | input should be bots_list grid_size input should be grid_n n_iter | input sould be iter_n Upon executing the cell, you should see a a 15x15 grid, with three bots (of different shapes), wandering around the grid for 25 iterations. In [ ] : 1 # YOUR CODE HERE 2 raise NotImplementedError() In [ ]: 1 == assert grid_n 15 assert iter_n == 25 2 Q8 - Multiple Bots (0.75 points) Let's create a larger board with multiple bots exploring at the same time! a) List of bots Create a list bots_list that contains three distinct WanderBot instances. Each WanderBot in bots_list will have a different shape, specified with the value passed into the character attribute. The first WanderBot in bots_list should take the character input value 1078. The second: 1127. The third: 1279. In [ ]: 1 # YOUR CODE HERE raise NotImplementedError() In [ ]: assert isinstance (bots_list, list) assert len(bots_list) == 3 In [ ]: i assert bots_list[0].character == assert bots_list[1].character == assert bots_list[2].character == A b) Create grid and play_board Step 1: Assign two variables 1. grid_n should be assigned the integer 15 2. iter_n should be assigned the integer 25 b) Create grid and play_board Step 1: Assign two variables 1. grid_n should be assigned the integer 15 2. iter_n should be assigned the integer 25 Step 2: Call play_board Call play_board() with the following inputs for the parameters in play_board : o bots | input should be bots_list grid_size input should be grid_n n_iter | input sould be iter_n Upon executing the cell, you should see a a 15x15 grid, with three bots (of different shapes), wandering around the grid for 25 iterations. In [ ] : 1 # YOUR CODE HERE 2 raise NotImplementedError() In [ ]: 1 == assert grid_n 15 assert iter_n == 25 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!