Answer:
listNumbers = [34,56,23,56,78,89,98,45,34,33,25,26,67,78]
listString = [ ]
for i in range(14):
if listNumbers[i]%2!=0 and listNumbers[i]%5==0:
listString.append("five odd")
elif listNumbers[i]%5==0 and listNumbers[i]%2==0:
listString.append("five even")
elif listNumbers[i]%2==0:
listString.append("even")
elif listNumbers[i]%2!=0:
listString.append("odd")
print(listNumbers)
print(listString)
Explanation:
In python programming language;
- Create two lists
- The first is a list of numbers and initialize it with random values: listNumbers = [34,56,23,56,78,89,98,45,34,33,25,26,67,78]
- The second list is empty and will hold the string values listString = [ ]
- Use a for loop to iterate over all the elementts in the list of numbers
- Use the modulo operator (%) to chech for multiples of particular numbers as stipulated by the question
- Use combination of if/elif statements for each condition
- Use the .append method to add the elements into the list of strings
- finially output both lists
See attached code and output
Answer:
0.9961
Explanation:
Given that:
Proportion of time waiting for I/O operation to complete = 25% = 0.25
Number of programs waiting in memory = 4
Using the CPU Utilization formula :
CPU Utilization = 1 - p^n
1 - 0.25^4
1 - 0.00390625
0.99609375
Is the <span>Boot Options window.</span>
Answer:
-32 to +31
Explanation:
6 bit 2s complement representation will be of the form b1b2b3b4b5b6 where each bit is either 0 or 1.
The largest positive number that can be represented using this scheme is 011111
Translating this to decimal this is 1*2^4 + 1^2^3 + 1^2^2 + 1^2^1 + 1^2^0
=16 + 8 + 4 + 2 + 1 =31
The smallest negative number that can be represented using this scheme is 100000
Translating this to decimal = -1 * 2^5 = -32
So the range of decimal values that can be represented is -32 to +31.