ECE 2524: Assignment 3

Hey everyone, Assignment 3 was due couple days back. We were suppose to write a program that is supposed to read from a standard input or a file and write to a standard output. The program also had to through standard error if there contained invalid input. We were also given a hint to use arg parse. For this program I used the sys module. It gave me access to the size of the arguments and what the arguments were. So from there I used simple logic to direct the program. When I was using arg parse, I was using the file type so when the user entered the “–ignore-blank” or “–ignore-non–numeric” the program gave error that the “–ignore-blank” or “–ignore-non-numeric” file directory was not found. So I decided to do it the other way. What I had to do was read the input and store the files in an array. I set up flags when the program read “–ignore-blank” or “–ignore-non-numeric” as an argument.

Leave a Reply

Your email address will not be published. Required fields are marked *