Question: Python CMSC 206 Please fix this code, send me what I should enter, and send me the output of the screenshot as well. file =
Python CMSC 206
Please fix this code, send me what I should enter, and send me the output of the screenshot as well.
file = input("Enter a file name: ") lines = open(file) cnt = 0 for line in lines: sp = line.split(" ") if sp[0] == "From": print(sp[1]) ++cnt print("There were " + str(cnt) + " lines in the file with From as the first word")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
