Well i think u should give up on school and just smoke some green fam.
Explanation:
conditional statements, conditional expressions and conditional constructs.
This question is incomplete. The complete question is given below:
Your company has just brought a new 22-core processor, and you have been tasked with optimizing your software for this processor. You will run four applications on this system, but the resource requirements are not equal. Assume the system and application characteristics listed in table 1.1
Table 1.1 Four Applications
Application
A
B
C
D
% resources needed
41
27
18
14
% parallelizable
50
80
60
90
The percentage of resources of assuming they are all run in serial. Assume that when you parallelize a portion of the program by X, the speedup for that portion is X.
a. How much speedup would result from running application A on the entire 22-core processor, as compared to running it serially?
Answer:
Speedup = 50
Explanation:
- The speedup for that portion is x if we parallelize a portion of that program by X.
- If the whole program has no parallelize portion or in other words the whole program is running serially then the speedup will be zero.
- So in this scenario if parallelizable portion of A is 50% so according to above description the speedup is 50.
Answer:
A
Explanation:
Schools are trying to adjust to technology to help students.
Answer:
weights = []
total = 0
max = 0
for i in range(5):
weight = float(input("Enter weight " + str(i+1) + ": "))
weights.append(weight)
total += weights[i]
if weights[i] > max:
max = weights[i]
average = total / 5
print("Your entered: " + str(weights))
print("Total weight: " + str(total))
print("Average weight: " + str(average))
print("Max weight: " + str(max))
Explanation:
Initialize the variables
Create a for loop that iterates 5 times
Get the values from the user
Put them inside the array
Calculate the total by adding each value to the total
Calculate the max value by comparing each value
When the loop is done, find the average - divide the total by 5
Print the results