Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Python Expert

Task:

You are to plan and then code a console-based program in Python 3, as described in the following information and sample output. This assignment will help you build skills using selection, repetition, file input/output, exceptions, lists/tuples, functions and string formatting. Do not to define any of your own classes. Assignment 2 will build on this program with more advanced code constructs including classes and a Graphical User Interface (GUI). Work incrementally on this task: complete small parts of it at a time rather than trying to get it all working at once.

Program Overview:

This program is a simple shopping list that could also be used for TODOs or similar purposes. The program maintains a list of items in a file, and each item has:

  • name, price, priority (1, 2 or 3), whether it is required or completed

Users can choose to see the list of required items or completed items, including a total of the (estimated) price of all of those items. The lists will be sorted by priority.

Users can add new items and mark items as completed.

They can't change items from completed to required.

Program Functionality Details:

Ensure that your program has the following features, as demonstrated in the sample output below.

Your program should:

  • display a welcome message with your name in it
  • display a menu for the user to choose from
  • return to the menu and loop until the user chooses to quit
  • error-check user inputs as demonstrated in the sample output
  • start by loading a CSV (Comma Separated Values) file of items that are in stock for hire;

a sample CSV file is provided for you

  • (when the user chooses list) display a neatly formatted list of all the required items with their prices lined up and priorities
  • (when the user chooses show completed) display a similarly formatted list of completed items
  • (when the user chooses add) prompt for the item's name, price and priority, error-checking each of these, then add the item to the list in memory
  • (when the user chooses complete) display the same list of required items, then allow the user to choose one (error-checked), then change that item to completed if no items are required, then a message should be displayed and the user returned to the menu
  • (when the user chooses quit) save the items to the CSV file, overwriting the file contents

Coding Requirements and Suggestions:

  • Make use of named constants where appropriate.
  • Use functions appropriately for each significant part of the program: this is the divide-and-conquer problem-solving approach. Remember that functions should "do one thing".

Look for situations where functions can be used to reduce code duplication (e.g. displaying the completed and required lists is very similar).

  • For efficiency, you should only load the items file once. Store the results appropriately in a list of lists that you can pass to any functions that need access to it.
  • Note that the menu choice should handle uppercase and lowercase letters.
  • Use exception handling where appropriate to deal with input errors (including entering numbers and selecting items).
  • Check the rubric carefully to see any other aspects of the coding that you will be assessed on.

Attachment:- Assignment.rar

Python, Programming

  • Category:- Python
  • Reference No.:- M91980233

Have any Question?


Related Questions in Python

Show times in tmus and seconds1 an associate grasps an oven

Show times in TMUs and seconds. 1. An associate grasps an oven door within reach and pulls it open 18 inches with the left hand (he does not relinquish control of the door). With a pan in the right hand, he carefully pos ...

Learning outcomes lo3 - research develop and document a

Learning Outcomes LO3 - Research, develop, and document a basic security policy, and analyse, record, and resolve all security incidents LO4 - Identify and assess the threats to, and vulnerabilities of networks Assessmen ...

Below zero - ice cream storethe local ice-cream store needs

Below Zero - ice cream store The local ice-cream store needs a new ordering system to improve customer service by streamlining the ordering process. The manager of the store has found that many orders are incorrect and s ...

In this programming assignment you will write a client

In this programming assignment, you will write a client pingprogram in Python. Your client will send a simple ping message to a server, receive a correspondingpong message back from the server, and determine the delay be ...

Lab assignment -background - we have discussed in detail

Lab Assignment - Background - We have discussed, in detail, the function of Stacks and Queues and how they are specifically implemented in Python. To get a better understanding of the utility of these data structures, we ...

Question research pythons dictionary data type dictdiscuss

Question : Research Python's dictionary data type (dict). Discuss its interface and usage. Include examples. Discuss practical applications of dictionaries.

Simple python traffic lightswrite a program that simulates

Simple Python (Traffic lights) Write a program that simulates a traffic light. The program lets the user select one of three lights: red, yellow, or green. When a radio button is selected, the light is turned on, and onl ...

Question why is software configuration management

Question : Why is software configuration management considered an umbrella activity in software engineering? Please include examples and supporting discussion. The response must be typed, single spaced, must be in times ...

Architecture and system integrationcase study queensland

Architecture and System Integration Case Study: Queensland Health - eHealth Investment Strategy After evaluating various platforms, Queensland Health finally decided to adopt a Service Oriented Architecture (SOA) for its ...

Project reconnaissance and attack on ics

Project: Reconnaissance and Attack on ICS NetworksEnvironment Setup The second mini project will be based on Industrial Network Protocols, specifically the Modbus protocol. Please follow the instructions carefully to set ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As