subject
Computers and Technology, 05.10.2019 01:20 med69

#read_running_times. py # chapter 6.2 page 258 def main(): # open the video_times. txt file for reading. video_file = open('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_time = float(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. close() # display the total of the running times. print('the total running time is', total, 'seconds.') # call the main function main()

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 22:50, cheyennecarrillo14
Which is the best minecraft server? a. mineplex b. worldonecraft c. 9b9t d. 2b2t
Answers: 2
image
Computers and Technology, 22.06.2019 23:30, lexirandall19
Define a function printfeetinchshort, with int parameters numfeet and numinches, that prints using ' and " shorthand. ex: printfeetinchshort(5, 8) prints: 5' 8"
Answers: 1
image
Computers and Technology, 23.06.2019 05:00, mikeysoulemison
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
image
Computers and Technology, 24.06.2019 05:00, alfarodougoy8lvt
Who is most likely be your target audience if you create a slide presentation that had yellow background and purple text
Answers: 2
You know the right answer?
#read_running_times. py # chapter 6.2 page 258 def main(): # open the video_times. txt file for rea...

Questions in other subjects:

Konu
Geography, 02.03.2021 22:00