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
Both waves can have interference, reflection, and diffraction.
Wave interference is a phenomenon that occurs when two waves meet while traveling along the same medium. The interference of waves causes the medium to take on a shape that results from the net effect of the two individual waves upon the particles of the medium.
Wave reflection happens when a wave reaches the boundary between one medium and another medium, a portion of the wave undergoes reflection and a portion of the wave undergoes transmission across the boundary.
Wave diffraction<span> involves a change in direction of waves as they pass through an opening or around a barrier in their path.<span> </span></span>
Answer D isn't a successful budgeting strategy.