Answer:
Time taken to travel from one track to the next = 0.08ms
Initial track= 15 0
4 (15-4)*(0.08)= 0.88
40 (40-4)*(0.08)= 2.88
35 (40-35)*(0.08)= 0.4
11 (35-11)*(0.08)= 1.92
14 (14-11)*(0.08)= 0.24
7 (14-7)*(0.08)= 0.56
----------------------------------------------
Total seek time=0.88+2.88+0.4+1.92+0.24+0.56=6.88ms
Explanation:
We caculate the seek time for each request, and then add them together to find the total seek time. The final track number for the current request becomes the current track of next request, and this process is repeated till the last request is processed.
The toll program illustrates the use of conditional statements;
As a general rule, conditional statements are used to make decisions
<h3>The
toll program</h3>
The toll program written in Python where conditional statements are used to make several decisions is as follows:
def calc_toll(hour, morning, weekend):
toll_fee = 0
if weekend == False:
if morning == True:
if hour < 7:
toll_fee+=1.15
elif hour < 10:
toll_fee+=2.95
elif hour <= 12:
toll_fee+=1.90
else:
if hour < 3:
toll_fee+=1.90
elif hour < 8:
toll_fee+=3.95
elif hour >= 8:
toll_fee+=1.40
else:
if morning == True:
if hour < 7:
toll_fee+=1.05
elif hour <= 12:
toll_fee+=2.15
else:
if hour < 8:
toll_fee+=2.15
elif hour >= 8:
toll_fee+=1.10
return toll_fee
Read more about conditional statements at:
brainly.com/question/24833629
#SPJ1
Answer:
<h2>Hakdog</h2>
Explanation:
<h3>kase hakdog ka kainin mo tite ko</h3>
Answer:
Explanation:
BEGIN
DEFINE n,tmp, tmp1 type Integer
n = 0
DISPLAY "Enter a number"
INPUT n
tmp = n + 4
tmp = tmp * 3
tmp = tmp + n
tmp1 = tmp / 2
tmp = tmp1 + 4
tmp = tmp / 2
tmp = tmp - n
DISPLAY tmp
END