Answer: >>>
Explanation:
just finished the test and got this right
Answer:
NO THANKS FOR THAT I WILL NOT JOIN
Please be more specific. What are you trying to ask?
Answer:
Explanation:
The following code was written in Python. Since no actual age was given in the question I created a function that takes in the age as a parameter. It then loops throught all of the entries in the input.txt file and selects only the ones that have the age higher than the passed argument and writes it to the output file. The code and both the input.txt and output.txt files can be seen in the image below.
def printCSV(age):
f = open("input.txt", "r")
f_output = open("output.txt", "w")
for line in f.readlines():
line_split = line.replace(" ", '').replace('\n', '').split(';')
if int(line_split[2]) >= age:
f_output.write(line)
print(line)
f_output.close()