Question 10 (1 point)
Which Python command do you use to select the string "g" from x
shown below?
import numpy as np
x = np.array([["a", "b", "c", "d"], ["e", "f", "g", "h"]])
Question 10 options:
x[1,2] |
|
x[-1,1] |
|
x[0,2] |
|
x[0][1] |
10)
Answer: x[1,2]
explanation:
x[1,2] means
array element at second row ,third column which is "g"
here
for first row : index is 0
second row : index is 1
third row : index is 2
like wise it continues
for first column : index is 0
second column : index is 1
third column : index is 2
like wise it continues
Question 10 (1 point) Which Python command do you use to select the string "g" from...
QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory Select the correct find command string below that will accomplish this. find /etc-name 'resolv.conf -cat D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...
QUESTION 19. 1 POINT From the following balanced equation, 4NH,(g) +50,(g) + 4 NO(g) + 6H, O(1) how many moles of H, O can be formed when 4.5 mol NH, react with 2.5 mol 0,2 Select the correct answer below: 2.5 mol O 2.0 mol O 3.0 mol O 6.8 mol FE
FIND THE SOLUTION TO THE FOLLOWING INEQUALITY X + 4 = x2 + 2 = 2X + 10 A) (-2,-2) U [4,00) B) (-2,4) C)(-0,-1) U (2.c) D)(-1,2) E)(-0,2] F)(-1,0) G)(-0,–2] U [4,6) H)[-2, -1] [2,4) Select one: a. D b. F C. A d. G e. C f. H g. B h. E
QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory. Select the correct find command string below that will accomplish this. find /etc -name 'resolv.conf-cat f} \; find /etc -name 'resolv.conf' -exec cat {} \; find . -name 'resolv.conf' -exec cat {} \; O find / -name 'resolv.conf' -exec...
This is a python matplotlib question. So it would be
great if you could show me in python method.
I have this loadtxt that asked to plot histogram of
wind gusts(column 3) that lie in direction angle(column 2) from min
angle to max angle inclusively. I don't know how to include
min_angle and max_angle into my codes.
Histogram of wind gust speeds As before the file akaroawindgusts.txt contains hourly maximum wind gusts speeds at the Akaroa Electronic weather station (EW)...
3. Write Python statements that will do the following: a) Input a string from the user. *** Print meaningful messages along with your output.* b) Print the length of the String. Example input: The sky is blue. Correct output: The length of the string is 16 Incorrect output: 16 c) Print the first character of the string. d) Print the last character of the string. 4. Save the program. Double-check the left edge for syntax errors or warning symbols before...
Please help! I am trying to make a convolution but i am receiving a syntax error. If anyone can help with how to do the convolution it would be much appreciated! This first part is the main program. import numpy as np from numpy import * import pylab as pl import wave import struct from my_conv import myconv #import scipy.signal as signal ##-------------------------------------------------------------------- ## read the input wave file "speech.wav" f = wave.open("speech.wav", "rb") params = f.getparams() nchannels, sampwidth, framerate,...
Question 2 0/1 point (graded) What happens when you remove a directory using the command rm -r? You cannot remove a directory using the rm command. You permanently remove the entire directory, including all files and subdirectories. You move the entire directory to a trash folder, but it can be restored later. You get a warning message asking if you want to proceed, then you delete the directory. incorrect Answer Incorrect: Try again. Unix does not warn you before permanently...
Select the Python math module function that give you the Euclidean norm, square root of x*x + y*y. This is the length of the vector from the origin to point (x, y). sin hypot cos sqrt radians What would be the value printed from the code below? import math print(math.ceil(math.e)) 7 2.718281 3.141592 2 3 What would be the value printed from the code below? import math print(math.floor(math.pi)) 2.718281 3.141592 2 3 6 ex is e raised to the power...
Question 4 (1 point) Translate this Python statement to Java: print(n, end=' ') Question 4 options: a. System.out.print(n) b. System.out.print(n + " "); c. System.out.println(n); d. System.println(n + " "); Question 5 (1 point) What is the output of this code fragment? int count = 0; for(int n = 3; n <= 10; n += 2) { count++; } System.out.println(count); Question 5 options: a. 2 b. 3 c. 4 d. 10