Skip to content

Instantly share code, notes, and snippets.

View Dinks68's full-sized avatar

Dinks68

View GitHub Profile
@rehatpsingh
rehatpsingh / .py
Created October 28, 2020 09:14
7.1 Write a program that prompts for a file name, then opens that file and reads through the file, and print the contents of the file in upper case. Use the file words.txt to produce the output below.
#100% working solution for python backgroud or python 3
fname = input("Enter file name: ")
try:
fh = open(fname)
except:
print('file not found:error')
quit()
text=fh.read()