Answer:
import pandas as pd
# loads the text file as a pandas dataframe
student_file = pd.read_fwf("std_info.txt")
# opens a new text file if the student_avg does not exist
# the file closes automatically at the end of the with statement
with open('student_avg.txt', 'w+') as file:
for row in student_file.iterrows():
file.write(row)
ee = student_file[student_file['major'=='EE']]
cpe = student_file[student_file['major'=='CPE']]
file.write(f'EE average = {ee['EE'].mean()}')
file.write(f'CPE average = {ee['CPE'].mean()}')
file.write(f'Total average = {student_file['EE'].mean()}')
Explanation:
The python program gets the text file as a fixed-width file and loads the file as a pandas dataframe. The dataframe is used to get the total average GPA the student GPA and the average GPA of students in various departments. The results are saved in a new file called 'student_avg.txt'.
Enclosed in number signs ######
The type of electronic monitoring that involves an offender being contacted periodically by telephone or beeper to verify his or her whereabouts is called the programmed contact. It is a method used in investigations to monitor the offender in a certain situation where he is forced to remain.
Which of the following terms describes surgery through a small incision in the abdomen? Laparoscopy. Laparoscopy is super done by using a fiber-optic instrument that is inserted through the abdomen. When this type of instrument is used, the incision is small and there are smaller cuts made to the person being operated on.
Explanation:
I have attached the answer as an image. I can't upload the file as it requires a licensed product and I only used demo version. I can provide the file too if you can give me your vlsig file required to use full software. However, If you just copy along the images on your Visual Studio, you will easily create the files yourself. Answer is provided for both scenarios as part A and part B, one which stops after 1 iteration and the one which loops until 0 height is given.