Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (15 points) read file()-which reads input.txt file consists of three numbers separated by J 2points) Write two python functions as follows: each line from

image text in transcribed
1. (15 points) read file()-which reads input.txt file consists of three numbers separated by J 2points) Write two python functions as follows: each line from a file "input.txt". Each separated by new line character. After reading from each line and subtract from the third number and my list. read file) function returns my list, For example: first line in the input file has line comma. Two consecutive lines are the file, add f rst two numbers of append the result in a list called 1, 2 and 10, y output.txt file) 2.(5 points) write filefmy list)-takes list my list as an argument and print the result in so you add 1 with 2 and subtract from 10 to get the output 7 (please see the an output file named "output.txt" One sample VO is as followS sample input.txt sample output.txt: 1,2,10 3,4,20 5,6,3p 13 19 #Write your code here as clearly as possible with proper indentation def read-file(): #definition write your code here def write-file(my-list): #defi nition # write your code here my-list-read-file() #function call file(mylist) #function call

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Hands-On Database

Authors: Steve Conger

2nd Edition

0133024415, 978-0133024418

Students also viewed these Databases questions

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago

Question

5. Tell how job experiences can be used for skill development.

Answered: 1 week ago