1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Misha Larkins [42]
3 years ago
11

Write a function that creates a one-dimensional game board composed of agents of two different types (0 and 1, X and O, stars an

d pluses... whatever you want where the agents are assigned to spots randomly with a 50% chance of being either type. Define the function so that it takes as inputs 1. The number of spots in the game board. Make it so that the default is set to 32. 2. A random seed that you will use to initialize the board (this will make it possible to test the reproducibility of your model). Also set a default seed value. Make sure your function returns your game board (Something to think about: which makes more sense to describe the game board, a list or a Numpy array? What are the tradeoffs?) Show that your function is behaving correctly by printing out the returned game board (Hint: There is more than one way to write this code· If you're having trouble coming up with your own method, you could consider trying to use np.random.choice(), but you'll have to read the documentation to figure out how to get the output you want.)
Computers and Technology
1 answer:
Grace [21]3 years ago
4 0

Answer:

Python code explained below

Explanation:

import random  #importing random library

def initialize_board(noOfSpot=32,seedIn=9):

#function with default spots set as 32

#default seed set as 9

random.seed(seedIn)

gameBoard = [] #initialising gameBoard list with empty values

for i in range(noOfSpot):

gameBoard.append(random.randint(0,1))

#adding values to gameBoard

return gameBoard

 

board =initialize_board(10,2)

print(board)

You might be interested in
. Each year over _____ tires are scrapped in the United States alone.
gregori [183]

290 is the number i found, So i would assume "C" is correct.

4 0
4 years ago
Read 2 more answers
Match the item to the type.
I am Lyosha [343]

Answer:

a. hardware - 3. motherboard

b. software - 2. Microsoft Word

c. input device - 4. mouse

d. operating system - 1. windows

7 0
3 years ago
Read 2 more answers
How many 2/8 pound patties can she make from 7/8 of a pound of hamburger
Juli2301 [7.4K]

Answer:

3/8

Explanation:

Because 2 can't go into 7, the next best thing is 6, so 2x3 is 6 with 1/8 left over~~~~~hope this helps :) pls brainlist

7 0
3 years ago
There are some practices that result in discrimination but may not look discriminatory at first glance. If a company only hires
den301095 [7]

Answer:

The correct answer to the following question will be "Adverse impact ".

Explanation:

An unintentional and unpredictable consequence of a specific action being taken. In the background of the job choices for firms, corresponds to an imbalance in recruiting or promotional selection that favors instances of a given group or ethnicity.

  • Several behaviors contribute to oppression but might not, at first sight, seem oppressive.
  • Unless a firm recruits only members of the family and community mates, it can unwittingly exclude other ethnicity categories.

3 0
3 years ago
Which of the following describe why a repeat block would be used in a project
iogann1982 [59]

Answer :If a project uses a  Repeat block  the same logic always holds when the commands are executed. Both block stacks perform the same behaviour.

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • What is a drawback to being in Slide Show mode? a- Being able to review each slide in order
    8·2 answers
  • Which of the following is a Microsoft solution that runs on a Microsoft Terminal Services server but appears, to end users, as i
    10·1 answer
  • 5. Bits are sent over a communications channel in packets of 12. (a) If the probability of a bit being corrupted over this chann
    12·1 answer
  • Array elements are differentiated because each has a unique: O A) Range O B) Data Type o c) Index O D) Value
    5·1 answer
  • 5. RAM IS YOUR SYSTEM’S-
    14·2 answers
  • ¿La tecnología ha esclavizado al hombre?
    15·1 answer
  • Complete the sentence.
    5·1 answer
  • 1. Technician A says you can identify a hybrid vehicle by the badging on the engine cover. Technician B says you can identify a
    8·1 answer
  • 2
    14·1 answer
  • ______-____ parameters provide a one-way link between actual parameters and formal parameters.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!