CSC 171 - Introduction to Computer Programming

Lab Assignment #17 - Maximum and Minimum Values

Due Friday, November 10, 2023

We have started working with text files, which we can open by writing:

my_file = open("my_file.txt", "r")

This assumes, of course, that I called my file my_file.txt and that I am using it as a source input (or "read-only"). Please note this requires your input file to be in the same directory as your Python function. Otherwise, you need to include the directory in which it is located.

To read each line in the file, you can use a for statement:

for inputLine in my_file:

Inside this loop you can do whatever you wish with your file.

Create a small text file called myTextFile.txt and display it converted into all capital letters. Submit with your code a flowchart and pseudocode.

[Back to the Lab Assignment List]