(A) Yes, because nobody is supposed to access non-work related sites during office hours.
Answer:
def sum_digits(number):
total = 0
if 1 <= number <= 999:
while number > 0:
r = int (number % 10)
total +=r
number /= 10
else:
return -1
return total
print(sum_digits(658))
Explanation:
Write a function named sum_digits that takes one parameter, number
Check if the number is between 1 and 999. If it is, create a while loop that iterates until number is greater than 0. Get the last digit of the number using mudulo and add it to the total. Then, divide the number by 10 to move to the next digit. This process will continue until the number is equal to 0.
If the number is not in the given range, return -1, indicating invalid range.
Call the function and print the result
Answer:
The space available will vary between 800 GB (100%) and 400 GB (50%) of the total disks, depending on the RAID level.
The OS will handle the RAID as a single disk.
Explanation:
Each RAID level implements parity and redundancy in a different way, so the amount of disks used for this extra information will reduce the space available for actual storage.
Usual RAID levels are:
<u>RAID 0:</u> does not implement any redundancy or parity, so you will have available 100% of the total storage: 8 x 100 GB = 800 GB
<u>RAID 1:</u> Duplicates all the information in one disk to a second disk. Space is reduced in half: 400 GB
<u>RAID 5:</u> Uses the equivalent of 1 disk of parity data distributed evenly on each disk, meaning the space available is of the total disks: of 800 GB = 700 GB
Writting and reading the information on a RAID storage is handled by a raid controller, either implemented in hardware or software. The OS will "see" a single disk and will read or write information as usual.