Answer:An operating system, or "OS," is software that communicates with the hardware and allows other programs to run. It is comprised of system software, or the fundamental files your computer needs to boot up and function.
Explanation:
Answer:
Comparison.
Explanation:
When we have to find a largest in a list of n elements.First we have to iterate over the list so we can access all the elements of the list in one go.Then to find the largest element in the list we have to initialize a variable outside the loop with the minimum value possible and in the loop compare each element with this value,if the element is greater than the variable assign the element to the variable.Then the loop will find the largest element and it will be the variable.
Answer:
See Explaination
Explanation:
class MagicSquare():
def __init__(self,side):
self.side=side
self.two_dimension=[]
for row in range(1,side+1):
row_line=[]
for col in range(1,side+1):
row_line.append(0)
self.two_dimension.append(row_line)
def display(self):
row=0
col=int((self.side-1)/2)
for i in range(1,self.side**2+1):
self.two_dimension[row][col]=i
row-=1
col+=1
if row==-1:
row=self.side-1
if col==self.side:
col=0
if self.two_dimension[row][col]==0:
continue
else:
row+=1
if row==self.side:
row==0
for line in self.two_dimension:
for num in line:
print("{0:>3}".format(num),end=" ")
print()
def main():
for i in range(1,14,2):
square=MagicSquare(i)
square.display()
print("----------------------------------------------------")
if __name__ == '__main__':
main()
C 20 previous typing actions
Answer:
3
Explanation:
no of boxes 15
each box hold 22 books
then 15×22=330 books occupied
left books are 375-330=45
so 45÷15=3 boxes will be need