Question: Program: Python Create a program that opens the text file and reads the prints out each line of a text file. However, if text files
Program: Python
Create a program that opens the text file and reads the prints out each line of a text file. However, if text files contain non-English languages (such as ) The program should handle the exception and print out the error message.
For example
example1.txt
Hello World?
My name is E.T.
Fun-Fact!
example2.txt
Hello World!
My nam is E.T.
readFile('example1.txt') will output
Hello World?
My name is E.T.
Fun-Fact!
readFile('example2.txt') will output
Sorry, I can't understand.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
