Question: Copy the same read / looping code from # 1 or # 2 and then create a new file with each number higher by 1
Copy the same readlooping code from # or # and then create a new file with each number higher by add ten to each number before writing it to a new file in numbers.txt
The new file can have any name.
from ast import Return
from pickle import APPEND
file opengoogledrivepath "numbers.txtr
lines
newfile opengoogledrivepath "newfile.txtw
for line in file:
lines.appendlinerstrip
newlines int line.rstrip
for in lines:
newfile.write
newfile.close
file.close
This is the code I have done so far and it outputs a new file but kept the same numbers from the original file instead of adding to each number in the list
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
