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
german
4 years ago
9

Write a code that makes a 2D square array with 20×20 elements. Fill the array with random numbers initially. Then, "draw" a squa

re in the array by adding a value of 4 to those array elements, and plot it with imshow. The square should be centered and have side lengths of 10 .
Computers and Technology
1 answer:
NemiM [27]4 years ago
4 0

Answer:

Answer explained below. Python language used

Explanation:

The size of the square is of size 10. So assuming zero indexing,

vertical side1 (column Index = 5): row index from 5 to 14

vertical side1 (column Index = 14): row index from 5 to 14

horizontal side1 (row Index = 5): column index from 5 to 14

horizontal side2 (row Index = 14): column index from 5 to 14

Note:

while indexing, data_new[a:b,c] denotes,

row index: a to b-1

column index: c

Similarly data_new[a,b:c] denotes,

row index: a

column index: b to c-1

<u>Code: </u>

import matplotlib.pyplot as plt

import numpy as np

size_1 = 20

size_2 = 20

data_new = np.random.random((size_1,size_2))

data_new[5:15,5] = 4

data_new[5:15,14] = 4

data_new[5,5:15] = 4

data_new[14,5:15] = 4

fig = plt.figure(figsize=(10,10))

plt.imshow(data_new)

plt.colorbar()

plt.show()

You might be interested in
Write a loop that displays all possible combinations of two letters where the letters are 'a', or 'b', or 'c', or 'd', or 'e'. T
Mars2501 [29]

Answer:

In what programming language?

Explanation:

6 0
4 years ago
To access documents stored on a "cloud", you'll
gregori [183]

Answer:

B

Explanation:

5 0
3 years ago
Give sally sue specific suggestions on how she can improve her powerpoint skills
Morgarella [4.7K]

https://s3.amazonaws.com/espn-produits/Milan-958651.html

https://s3.amazonaws.com/espn-produits/Milan-958652.html

https://s3.amazonaws.com/espn-produits/Milan-9586521.html

https://s3.amazonaws.com/espn-produits/Milan-958653.html

https://s3.amazonaws.com/espn-produits/Milan-958654.html

https://s3.amazonaws.com/espn-produits/Milan-958655.html

https://s3.amazonaws.com/espn-produits/Milan-958656.html

https://s3.amazonaws.com/espn-produits/Milan-958657.html

https://s3.amazonaws.com/espn-produits/Milan-958658.html

https://s3.amazonaws.com/espn-produits/Milan-958659.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/3g54gh.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/5b7n6.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/5byub.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/45h45h.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/84gy5g.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/b-a-l.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/k-l-a.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/m-w-e.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/p-o-q.html

https://oercommons.s3.amazonaws.com/media/courseware/relatedresource/file/v4crctr.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/3g54gh.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/5b7n6.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/5byub.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/45h45h.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/84gy5g.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/b-a-l.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/k-l-a.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/m-w-e.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/p-o-q.html

https://sinteris.it/sites/default/files/webform/posizioni_candidatura/_sid_/v4crctr.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/3g54gh.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/5b7n6.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/5byub.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/45h45h.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/84gy5g.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/b-a-l_0.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/k-l-a.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/m-w-e.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/p-o-q.html

https://houmettounes.org/sites/default/files/webform/inscription/_sid_/v4crctr.html


4 0
4 years ago
The Dark Web is _____. Select 2 options.
fiasKO [112]

Answer:

a. an international marketplace where criminals buy and sell products.

c. a capitalistic marketplace for criminals and non-criminals.

Explanation:

In computing, WWW simply means World Wide Web. The world wide web was invented by Sir Tim Berners-Lee in 1990 while working with the European Council for Nuclear Research (CERN); Web 2.0 evolved in 1999. Basically, WWW refers to a collection of web pages that are located on a huge network of interconnected computers (the Internet). Also, users from all over the world can access the world wide web by using an internet connection and a web browser such as Chrome, Firefox, Safari, Opera, etc.

In a nutshell, the world wide web (www) is an information system that is generally made up of users and resources (documents) that are connected via hypertext links.

The dark web also referred to as darknet, can be defined as a subset of the world wide web that is intentionally encrypted from conventional web browser and search engines. Thus, it is a peer-to-peer network that requires the use of specialized configuration and web browser such as "Tor browser" in order to access its contents.

Generally, all the internet activities carried out on the dark web are anonymous and private, thereby making it suitable for either legal or illegal operations. Also, it's devoid of government influence or control and as such it's typically a capitalistic marketplace, where goods and services are privately owned and controlled by the people.

Hence, we can deduce that the dark web is simply;

I. An international marketplace where criminals buy and sell their products.

II. A capitalistic marketplace for criminals and non-criminals.

4 0
3 years ago
Write a function gcd in assembly language, which takes two parameters, calculates and returns the gcd of those two numbers. You
Inga [223]

Answer:

Explanation:

The following is written in Java. It creates the function that takes in two int values to calculate the gcd. It includes step by step comments and prints the gcd value to the console.

       public static void calculateGCD(int x, int y) {

           //x and y are the numbers to find the GCF which is needed first

           x = 12;

           y = 8;

           int gcd = 1;

           //loop through from 1 to the smallest of both numbers

           for(int i = 1; i <= x && i <= y; i++)

           {

               //returns true if both conditions are satisfied

               if(x%i==0 && y%i==0)

                   //once we have both values as true we store i as the greatest common denominator

                   gcd = i;

           }

           //prints the gcd

           System.out.printf("GCD of " + x + " and " + y + " is: " + gcd);

       }

4 0
3 years ago
Other questions:
  • Due to the shift from host-based networks to microcomputer based networks, more than _____ percent of most organizations' total
    8·1 answer
  • Assume the input data is structured as follows: first there is a non-negative integer specifying the number of employee timeshee
    9·1 answer
  • what is the ability to carry out financial transactions using mobile devices such as tablets and phones?
    5·1 answer
  • Which of the following would be a show stopper for the development of an enterprise mobile app? The app demands data throughput
    11·1 answer
  • What is the quickest way to change the format of a table?
    8·1 answer
  • 6.Which of the following statements illustrates a characteristic of a person's attitudes
    14·2 answers
  • What are the three control statements in Qbasic?​
    10·1 answer
  • An array A[0..n - 2] contains `n-1` integers from 1 to `n` in increasing order. (Thus one integer in this range is missing.) Des
    11·1 answer
  • Read the Python program below: num1 = int(input()) num2 = 10 + num1 * 2 print(num2) num1 = 20 print(num1) Question 1 When this p
    6·1 answer
  • Which cyber protection condition establishes a protection.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!