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
wlad13 [49]
3 years ago
9

Given a matrix input_matrix, return a Numpy array that consists of every entry of A that has: an even row index in the range [0,

7) an odd column index in the range [3, 8) This can be accomplished in a single line.
def PROBLEM3 (input_matrix):
# YOUR CODE GOES HERE
return output_matrix
# DO NOT MODIFY
np.random.seed (3251)
example = np.random.randint(0, 10, (10,10))
print(example)
print(PROBLEM3 (example))
Computers and Technology
1 answer:
ipn [44]3 years ago
6 0

Answer:

range [0, 7) an odd column index in the range [3, 8) This can be accomplished in a single line.

def PROBLEM3 (input_matrix):

# YOUR CODE GOES HERE

return output_matrix

# DO NOThern bus under

You might be interested in
Consider two different implementations of the same instruction set architecture (ISA). The instructions can be divided into four
PSYCHO15rus [73]

Answer: Find answers in the attachments

Explanation:

3 0
4 years ago
Hello users !
vazorg [7]

no here r the ranks:Beginner

Helping Hand

Virtuoso

Expert

and genius

5 0
4 years ago
Read 2 more answers
What are the correct answers to the following questions?
Lena [83]

Answer:

1. analog sound

2. digital sound

3. pixels

4.  local area network

5.bus

6. slots

Explanation:

4 0
2 years ago
def getCharacterForward(char, key): """ Given a character char, and an integer key, the function shifts char forward `key` steps
zhenek [66]

Answer:

  1. def getCharacterForward(char, key):  
  2.    charList = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  3.    if(len(char) > 1):
  4.        return None  
  5.    elif(not isinstance(key, int)):
  6.        return -1
  7.    else:
  8.        index = charList.find(char)
  9.        if(index + key <= 25):
  10.            return charList[index + key]
  11.        else:
  12.            return charList[(index + key)% 26]
  13. print(getCharacterForward("C", 4))
  14. print(getCharacterForward("X", 4))

Explanation:

Firstly, define a charList that includes all uppercase alphabets (Line 2). We presume this program will only handle uppercase characters.

Follow the question requirement and define necessary input validation such as checking if the char is a single character (Line 4). We can do the validation by checking if the length of the char is more than 1, if so, this is not a single character and should return None (Line 5). Next, validate the key by using isinstance function to see if this is an integer. If this is not an integer return -1 (Line 6 - 7).

Otherwise, the program will proceed to find the index of char in the charList using find method (Line 9). Next, we can add the key to index and use the result value to get forwarded character from the charList and return it as output (Line 11).

However, we need to deal a situation that the char is found at close end of the charList and the forward key steps will be out of range of alphabet list. For example the char is X and the key is 4, the four steps forward will result in out of range error. To handle this situation, we can move the last two forward steps from the starting point of the charList. So X move forward 4 will become B. We can implement this logic by having index + key modulus by 26 (Line 13).  

We can test the function will passing two sample set of arguments (Line 15 - 16) and we shall get the output as follows:

G

B

8 0
3 years ago
What are the components that make a computer work?
Schach [20]

Answer: Plastic, metal, rubber, wiring, electricity, technology, wifi,  

Explanation: You need  PLASTIC to make a frame for the computer. METAL

to make an exoskeleton under the plastic frame. RUBBER to hold those loose wires and to make sure the electricity doesn't escape and shock you. ELECTRICITY to charge and make the computer runs.  Technology is used for you to log in and out of your computer and WIFI to make sure it doesn't lag.

8 0
3 years ago
Other questions:
  • Determine the number of bytes necessary to store an uncompressed RGB color image of size 640 × 480 pixels using 8, 10, 12 and 14
    11·1 answer
  • Suppose there are 69 packets entering a queue at the same time. Each packet is of size 7 MiB. The link transmission rate is 1.7
    9·1 answer
  • Which of the following would allow for the QUICKEST restoration of a server into a warm recovery site in a case in which server
    10·1 answer
  • A(n) ________ is a chart based on PivotTable data.
    15·1 answer
  • Delete temp or %temp% files in Windows 10 is safe and, can it help boost up your PC fps?
    5·1 answer
  • 3. Cellular phone technology works on a system of geographically separated zones
    12·1 answer
  • The relationship between social media and the Internet is complex. Individual Internet behavior involves a myriad of factors tha
    6·1 answer
  • ________(fill in the blank)in online education is intrinsically related to equity.
    13·1 answer
  • What does a companys code of ehtics cover
    13·2 answers
  • What correlation is obtained when the pearson correlation is computed for data that have been converted to ranks?
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!