Code a console-based program in python

Assignment Help Python Programming
Reference no: EM131243859

Assignment - Shopping List 1.0

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.

Output Requirements:

Sample output from the program is provided below. Ensure that your program matches the sample output including spaces, spelling, and especially the formatting of the item lists. Think of this as helpful guidance as well as training you to be particular and pay attention to detail. The sample output is intended to show the full range of situations including user input error handling.

Verified Expert

Shopping Assignment: This program is about creating a console based items/products list management in shop using PYTHON program. It reads the items list from csv file and allow us to perform actions such as "Mark as complete","Add new items" to the list along with displaying all required items and completed items with easy Menu options. Final updated list will be written to the csv file.

Reference no: EM131243859

Questions Cloud

What best approach to measure organizational effectiveness : Do you agree with the statement: "An organization's effectiveness is measured by the degree to which the organization achieves its goals?" Why or why not? How does the organization's effectiveness relate to success, if at all? Explain.
Consists of dimes and quarters : A sum of money amounting to $6.90 consists of dimes and quarters. If there are 39 coins in all, how many are quarters?
Define the standardized budget : Explain how built-in (or automatic) stabilizers work. What are the differences between proportional, progressive, and regressive tax systems as they relate to an economy's built-in stability?
Define and contrast reversible and nonreversible cell injury : Explain the pathological processes associated with the term "heart muscle died." Discuss and contrast reversible and nonreversible cell injury. As per your analysis, what type of cell injury did Mr. Smith sustain and why?
Code a console-based program in python : CP1404/CP5632 2016 SP2/22/52 Assignment - Shopping List 1.0. 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,..
Prepare a report on photostimulable phosphors : Prepare a report on photostimulable phosphors - Includes (any things related to the topic) introduction, Body, Conclusion and References
Review underlying cause of biology and inherited behavior : Review the underlying cause of biology and inherited behavior then suggest two (2) possible outcomes for each. Next, determine whether either of these underlying causes can be treated and corrected to allow an individual to align his or her thinki..
A person who thinks the public sector is too large : A person who thinks the public sector is too large? How does the "ratchet effect" affect anti-inflationary fiscal policy?
Construct a frequency table and display it as a histogram : Construct a frequency table and display it as a histogram using a class width of 10 starting at 0.  [Recall:  LCB is included in the class interval whereas UCB is not included.]  (Be sure to show all of your work, including your frequency chart.)

Reviews

Write a Review

Python Programming Questions & Answers

  Modify your code to ask the user for the id of a restaurant

Copy check1.py to check2.py and continue to work on check2.py. Modify your code to ask the user for the id of a restaurant between 1 and 155 (humans don't need to know about list ids starting at 0).

  The managing director of aussie best car abc has invited

the managing director of aussie best car abc has invited you to build a new computer system for them in python. the abc

  A string is valid windows filename.

writing a function in python that verifies whether a string is valid windows filename.

  Design a function that accepts an integer

Design a function that accepts an integer argument and returns the sum of all the integers from 1 up to the number passed as an argument. For example, if 50 is passed as an argument, the function will return the sum of 1, 2, 3, 4, . . . 50. Use recur..

  How do you call the main function in python

How do you call the main function? in Python

  Input a temperature as a floating point

Your program should input a temperature as a floating point number with an appended unit letter. It should then print the temperature in all four of the units above

  Find a python script

Find a python script

  Q1there has been tremendous development in the arid west of

q1there has been tremendous development in the arid west of the united states over the past few decades creating

  Assume that the variables gpa , deanslist and studentname

Assume that the variables gpa , deansList and studentName , have been initialized. Write a statement that adds 1 to deansList and prints studentName to standard out if gpa exceeds 3.5.

  Convert inches into yards feet and inches

Convert inches into yards, feet, and inches

  Reinforce topic material on simple functions

Select 3 sets of test data that will demonstrate the correct 'normal' operation of your program. Select another 2 sets of test data that will demonstrate the "abnormal" operation of your program.

  Write an expression that concatenates the string

Write an expression that concatenates the String variable suffix onto the end of the String variable prefix .

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd