#Write a program to read through a file and print the contents of the file (line by line) all in upper case
fname = input("Enter file name: ")
try:
    fhand = open(fname)
except:
    print("File Cannot be opened:", fname)
    quit()
    
for line in fhand:
    #remove the white after each line
    line = line.rstrip()
    print(line.upper())

d7fa38cbeaf619a2bbf179f1399df6b4214752fb
<mask token>

<mask token>
try:
    fhand = open(fname)
except:
    print('File Cannot be opened:', fname)
    quit()
for line in fhand:
    line = line.rstrip()
    print(line.upper())

fname = input('Enter file name: ')
try:
    fhand = open(fname)
except:
    print('File Cannot be opened:', fname)
    quit()
for line in fhand:
    line = line.rstrip()
    print(line.upper())

#Write a program to read through a file and print the contents of the file (line by line) all in upper case
fname = input("Enter file name: ")
try:
    fhand = open(fname)
except:
    print("File Cannot be opened:", fname)
    quit()
    
for line in fhand:
    #remove the white after each line
    line = line.rstrip()
    print(line.upper())
