Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Final/Exam 4 Fall 2022 1. All work must be done in Replit - Final Exam project. As you work, an audit trail is being

image text in transcribedimage text in transcribed

Final/Exam 4 Fall 2022 1. All work must be done in Replit - Final Exam project. As you work, an audit trail is being maintained to check for potential cheating. To avoid problems, do ALL WORK in the Final Exam replit. Due to time constraint, this exam will be especially difficult for most students. You are not expected to to get everything perfect, but you should be able to do most of the work. You will get partial credit. I also curve my exams. I will not know the curve until all the grading is finished for the entire semester. I will post your grades on CUNYfirst by December 23 2. Use import statements as needed to make this application work. (2 points) 3. For file handling, use Open and Close statements as appropriate. (2 points) 4. You will ask the user to enter the following data: id: Any string is valid. Remove any leading or trailing spaces before assigning the value to the variable. In other words, all the work must be done in one line. (2 points) price: Any decimal or integer number. Any conversion should be done before assigning the variable a value. In other words, all the work must be done in one line. (2 points) color: This is a string input. You must convert it to UPPER CASE using Python's built-in functions before assigning it to the variable. Also, remove any leading or trailing spaces before assigning the value to the variable. In other words, all the work must be done in one line. (3 points) If the user does not enter a valid value for id, the program should immediately exit and give an error message. (2 points) If the user does not enter a valid value for color, the program should immediately exit and give an error message. (2 points) 5. Create a variable for internal use by your program. (1 points) Create a variable called FILENAME. Keep it in uppercase as shown. Assign this variable the value: item-data.txt The user of your application should not be able to modify this variable.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting Texts and Cases

Authors: Robert Anthony, David Hawkins, Kenneth Merchant

13th edition

1259097129, 978-0073379593, 007337959X, 978-1259097126

More Books

Students also viewed these Accounting questions

Question

Why does each step need its own Done column?

Answered: 1 week ago

Question

When a card moves from one step to the next, who works on it?

Answered: 1 week ago