Question: Program contains three syntax or logic errors. Your challenge is to find these errors and fix them. # read-running-time s . py # Chapter 6.2

Program contains three syntax or logic errors. Your challenge is to findProgram contains three syntax or logic errors. Your challenge is to find these errors and fix them.

# read-running-time s . py # Chapter 6.2 Page 258 def mainQ: # Open the video-times. txt file for reading. video_fileopen( video times.txt', "r' # Initialize an accumulator to 0.0 total -0.0 # Initialize a variable to keep count of the videos. count = 0 print('Here are the running times for each video:") # Get the values from the file and total them for line in video file # Convert a line to a float. run_timefloat(line]) # Add 1 to the count variable count += 1 # Display the time print( ' Video #', count, ': ', run-time, sep.') # Add the time to total total +count # Close the file video_file.closeC) # Display the total of the running times. print('The total running time is', total, "seconds. " # Call the main function main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!