Question: 5 7 6 2 5 4 . 4 5 0 8 5 7 4 . qx 3 zqy 7 Jump to level 1 A file's
qxzqy
Jump to level
A file's name is read from input. The file is opened and yamfile is assigned with the file object. Each line in yamfile contains an integer representing the number of yams eaten in a day. Use a loop to read each line of yamfile. Inside the loop, subtract each integer in yamfile from quantityremaining.
Click here for example
Ex: If the input is datal.text and:
then the output is:
Total yams:
Yams remaining:
tablemainpydatatxtdatatxtdatatxt
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
