Problem #1
This first problem is admittedly pretty uninteresting. It's just to get us practicing and reviewing various Python concepts and techniques that we have been learning.
Reminder: Again, remember not to try to do too much at once. Get one small bit of functionality working, and then work on the next bit. Even within each of the itemized requirements below, you may want to just do part of each one, test it well, before working on the next little bit of functionality.
Create a function called that has a parameter representing a filename.
The function should open the file and then do the following:
Print: (where 'ZZZZ' is the name of the file). Note that the
filename is in quotes. You can also see this in the output example below.
Place the code where you open the file, read in the information you need, and close the file inside an try/catch exception block. Your exception should catch a FileNotFoundError . If this exception occurs, output:
again where ZZZZ is the name of
the file. And your function should immediately end.
If the file has less than 10 lines, your function should simply output:
(where ZZZ is the number of lines). Your function should then
immediately terminate.
Now if the file being opened has 10 lines or more, you will do the following:
For each line, output either if the line is less than 25 characters, output
if the line is 25 or more characters, and less than 50 characters, output if the line is 50 or more characters.
You should do this only for the first 10 lines of the file. So even if the file has many, many lines, only output the values for the first 10 lines.
Each statement should be preceded by
number. Again, see the sample test output below.
where Z represents the line
You should find yourself using format strings for just about all of your statements.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme