Sep-13-2017, 08:22 PM
To get input from the user, use the input function:
read_name = input('Please enter the name of the file to read: ')I'm not sure exactly what he means by try/except for a file, but I assume he means something like this:
try: read_file = open(read_name) except IOError: # give a warning to the user and quit the program.It may be something he went over in class, I'd check any materials he's handed out.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures