Question: Q 4 ) Define a function, make _ hills, that takes a file path and a list of integers and writes a *
Q Define a function, makehills, that takes a file path and a list of integers and
writes a that many times on a line for each number in the list. Calling this function
multiple times should add more lines to the end of the file. Ignore any numbers that
are negative.
Hint: You can create a duplicated string using the multiplication operator; for example
"test" would result in "testtesttest".
Ex: Input: "hills.txt
File Before:
File After:
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
