Question: 1 #write a function called angry file finder that accepts a 2 #fllename as a parameter. The function should open the file, 3 #read it,

 1 #write a function called "angry file finder" that accepts a

1 #write a function called "angry file finder" that accepts a 2 #fllename as a parameter. The function should open the file, 3 #read it, and return True if the file contains "1" on every 4 #line. Otherwise the function should return False. 5# 6 #Hint : there are lots of ways to do this. We'd suggest using 7 #either the readline() or readlines() methods. readline() 8 #returns the next line in the file; readlines() returns a 9 #list of all the lines in the file. 10 12 #Write your function here! 13 14 15 16 #Below are some lines of code that will test your function 17 #You can change the value of the variable(s) to test your 18 #function with different inputs. 19 # 20 #If your function works correctly, this will originally 21 #print : True 22 print (angry file finder("AngryFileFinderInput.txt")) 23

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!