subject

The following code segment is supposed to read all of the lines from test. txt and save them in copy. txt. infile = open("test. txt", "r") outfile = open("copy. txt", "w") line = infile. readline() outfile. write(line) line = infile. readline() infile. close() outfile. close() which line of code should be placed in the blank to achieve this goal?

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:00, ashleyd198308
Respond to the following in three to five sentences. select the workplace skill, habit, or attitude described in this chapter that you believe is most important for being a successful employee.
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, mads000
Drag the tiles to the correct boxes to complete the pairs. match the errors with their definitions. #name #value #ref when a formula produces output that is too lengthy to fit in the spreadsheet cell arrowright when you enter an invalid cell reference in a formula arrowright when you type text in cells that accept numeric data arrowright when you type in a cell reference that doesn’t exist arrowright reset next
Answers: 1
image
Computers and Technology, 24.06.2019 10:20, silviamgarcia
Write a program that keeps asking the user for new values to be added to a list until the user enters 'exit' ('exit' should not be added to the list). these values entered by the user are added to a list we call 'initial_list'. then write a function that takes this initial_list as input and returns another list with 3 copies of every value in the initial_list. finally, inside print out all of the values in the new list. for example: input: enter value to be added to list: a enter value to be added to list: b enter value to be added to list: c enter value to be added to list: exit output: a b c a b c a b c note how 'exit' is not added to the list. also, your program needs to be able to handle any variation of 'exit' such as 'exit', 'exit' etc. and treat them all as 'exit'.
Answers: 2
image
Computers and Technology, 25.06.2019 08:20, Wintersavannah
The control unit takes ths instructions fetched by the preteched unit and translates them into a form that can be understood by
Answers: 1
You know the right answer?
The following code segment is supposed to read all of the lines from test. txt and save them in copy...

Questions in other subjects:

Konu
Mathematics, 06.10.2019 11:30