Code a console-based program in python

Assignment Help Python Programming
Reference no: EM131316320

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
o 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.

Reference no: EM131316320

Questions Cloud

Discuss who would be the champion for the bill : Discuss who would be the champion for the bill/law change from your state advocates (legislators, federal legislators, local or national state nursing organizations). Are these individuals also influential in making changes occur? Did you vote for..
Formulate a polling station location problem : Formulate a polling station location problem, taking into account the number of polling stations is fixed for each municipality and calculated according to the number of resident voters.
How do you define professionalism : Compare and contrast responses provided by your peer with those provided by the leader. Share your impressions of their differences and similarities.Do you consider leaders in your organization stewards of health care? Why or why not?
Compute the bilateral laplace transform : Using the definition, compute the bilateral Laplace transform, including the region of convergence (ROC)
Code a console-based program in python : CP1404/CP5632 2016 SP2/22/52 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, repetition,..
Company needs electric energy for a warehouse : Company needs electric energy for a warehouse. Consult the web pages of at least three potential providers and evaluate them in terms of their average price during the morning shift, payment conditions and reputation.
Determine the corresponding region of convergence : Determine the corresponding region of convergence.
How the solution changes according to different values : Determine the supplier to be selected by using ASM and RSM. Discuss how the solution changes according to different values of the parameter α.
Examine the article unions in the healthcare industry : NURS 6221: MANAGING HUMAN RESOURCES - Discussion: The Unionization of Employees. Examine the article "Unions in the Healthcare Industry," taking note of the timeline of unionized activities such as the collective bargaining process, the campaign pe..

Reviews

Write a Review

Python Programming Questions & Answers

  Design reusable parameterised functions

create multiple icon styles that can be drawn at different sizes, it would be very repetitive if you tried to code the whole solution using ‘brute force.' Instead you are strongly encouraged to design reusable parameterised functions to draw the i..

  Write a program that accepts as input a sentence

Write a program that accepts as input a sentence in which all of the words are run together but the first character of each word is uppercase. Convert the sentence to a string in which the words are separated by space and only the first word start..

  Write a program that opens an encrypted file

Write a second program that opens an encrypted file and display its decrypted contents on the screen.

  Implement the sieve of eratosthenes

Implement the Sieve of Eratosthenes and use it to find all prime numbers less than or equal to one million. Use the result to prove Goldbach's Conjecture for all even integers between four and one million, inclusive.

  Write a loop that counts the number of space

Write a loop that counts the number of space characters in a string. Recall that the space character is represented a

  Improve the code for the haunted house game

Improve the readability of the code by improving the function names, variables, and loops, as well as whitespace. Document these changes in your journal and define a win condition for the game, for example, collecting all items and returning to the..

  Permutation ciphers

Permutation Ciphers (a.k.a. Transposition Ciphers) are another class of simple cryptosystems. For this we use the functions apply(.,.) and inv(.) from Homework 4; copy these two functions into your le as auxiliary functions.

  Tinter interactive animation program

I have a Tinter interactive animation program where I should do a number of specific features. For example, a rotating sticks animation is already set. I have to add the following feature "Pressing "z" teleports a random stick to a random location..

  Write a program to determine the coefficients of expanded

Write a program to determine the coefficients of expanded form of (aX+bY+c)n. Every line in bold is questions to ask whoever runs the program to enter values or commands (y or n) at the console.

  Most popular name would be the one with the biggest number

the program will ask you to insert the year that the user is interested in, then ask the gender that the user is interested in, and print out the most popular names corresponding to the year and gender. FYI, the number on the right represents how man..

  Write the code to allow user to input three integer numbers

Write the code to allow a user to input three integer numbers. The program will then produce the average of thosethree numbers

  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