Answer:
The program in Python is as follows:
total = 0
count = 0
for i in range(8):
num = float(input())
if num < 10.5:
total+=num
count+=1
print("Average: ",total/count)
Explanation:
This initializes the total to 0
total = 0
This initializes the count to 0
count = 0
This loop is executed 8 times
for i in range(8):
This request for float number
num = float(input())
If input is less than 10.5
if num < 10.5:
The sum is taken
total+=num
And count is incremented by 1
count+=1
The loop ends here
This calculates and prints the average
print("Average: ",total/count)
How it could affect me if an employer (future or current) sees it and whether or not I would want strangers to be able to view it.
I'm pretty sure the general rule of advice is that if you wouldn't want your mother to see it, you probably shouldn't post it.
Answer:
The summary including its given problem is outlined in the following section on the interpretation.
Explanation:
That's not entirely feasible, since at least n similarities have to be made to order n quantities. Find the finest representation where the numbers of 1 to 10 have already been arranged.
⇒ 1 2 3 4 5 6 7 8 9 10
Let's say that we identify one figure as the key then compared it towards the numbers across the left. Whether the correct number is greater, therefore, left number, are doing nothing to switch the location elsewhere.
Because although the numbers have already been categorized 2 has always been compared to 1 which would be perfect, 3 becomes especially in comparison to 2 and so much more. This should essentially take 9 moves, or nearly O(n) moves.
If we switch that little bit already
⇒ 1 3 2 4 5 6 7 8 9 10
3 Is contrasted with 1. 2 will indeed be matched against 3 as well as 2. Since 2 has indeed been exchanged, it must, therefore, be matched with 1 as there might be a case whereby each number z exchanged is greater than the number Y as well as the quantity X < Y.
Only one adjustment expanded the steps which culminated in n+1.