Answer:
In Python:
import os.path
from os import path
fname = input("Filename: ")
if path.exists(fname):
with open(fname) as file_in:
lines = []
for line in file_in:
lines.append(line.rstrip('\n'))
f = open("stat.txt","r+")
f.truncate(0)
f = open("stat.txt", "a")
f.write("Names\tTotal\tSubjects\tAverage\n")
for i in range(len(lines)):
rowsum = 0; count = 0
nm = lines[i].split()
for j in nm:
if (j.isdecimal()):
count+=1
rowsum+=int(j)
average = rowsum/count
f.write(nm[0]+"\t %3d\t %2d\t\t %.2f\n" % (rowsum, count, average))
f.close()
else:
print("File does not exist")
Explanation:
See attachment for explanation where comments were used to explain each line
Answer:
PLANING
Explanation:
They include: planning, organizing, leading, and controlling. You should think about the four functions as a process, where each step builds on the others. Managers must first plan, then organize according to that plan, lead others to work towards the plan, and finally evaluate the effectiveness of the plan.
Explanation:
A group of cells working together is defined as a TISSUE
And a group of tissues working together is defined as an ORGAN
Example : A heart Is an organ which is made up from muscle and valve Tissue.
Answer:
The answer is D. <em>os.path.exists(filename)</em>
Explanation: