Answer:
Chech the explanation
Explanation:
<em>In [16]:</em>
<em />
# Your answer to this question might be written on more than a line.
datascience_trials = make_array()
for i in np.arange(1000):
datascience_trials = np.append(datascience_trials, simulate_several_key_strikes(1))
datascience_proportion = np.count_nonzero(datascience_trials == 'datascience')/1000
datascience_proportion
<em>Out [16]:</em>
0.0
<em>In [17]:</em>
_ = ok.grade('q2_4')
````````````````````````````````````````````````````````````````````````````````````````````````````````
#Running tests
Answer:
30 units of Food A and 45 units of Food B are to be purchased to keep costs at the minimum $105.
Explanation:
X = Amount of food A
Y = Amount of food B
Z= 2X+Y..... minimum cost equation
50X + 20Y > 2400 .................Vitamins .......(1)
30X + 20Y > 1800 ...................Minerals.......(2)
10X + 40Y > 1200 .................Calories ..........(3)
X > 0
y > 0
X=30 and Y = 45
Z= 2(30) + 45 = $105
Answer:
import java.util.Arrays;
import java.util.Scanner;
public class num4 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("How many numbers? ");
int n = in.nextInt();
int []intArray = new int[n];
//Entering the values
for(int i=0; i<intArray.length;i++){
System.out.println("Enter the numbers");
intArray[i]=in.nextInt();
}
System.out.println(Arrays.toString(intArray));
int min =intArray[0];
for(int i =0; i<intArray.length; i++){
if(min>intArray[i]){
min = intArray[i];
}
}
System.out.println("The Minimum of the numbers is "+min);
}
}
Explanation:
- Using Java programming language
- Prompt the user for the number of values
- Using Scanner class receive and store in a variable
- Create an array of size n
- Using an for loop continuously ask the user to enter the integers
- Print the array of integers
- Using another for loop with an if statement, find the smallest element in the array of numbers
- Output the the smallest number
D. It’s a sketch. That is, if you talking about, an art piece.