SlideShare a Scribd company logo
1 of 14
Assignment 1
Stock Management
The goal here is to write some software that would assist a
retail store manage their stock levels. The assignment will get
progressively more complex as it proceeds - the early stages
will be reasonable straight forward and will be sufficient for a
passing grade, and the more advanced stages are for those who
wish to go further and target a higher overall result.
General Requirements
All assignments should be written in Python 3 and should run in
IDLE. They can be written on any type of computer, but they
should be able to be executed in the computer pool.
The highest marks will be for working code. However, in cases
where there are problems, you will be assigned marks for how
you approached the task. It is also expected that you will
provide comments in the programs to explain how it works, and
these comments will account for up to 10% of the overall grade.
In each case example output is given. You should try and make
your output and process match the example as closely as
possible.
Stage 1: Data Entry
Write a program which requests that requests a product
name and a stock number. Store that data in a List or
a Dictionary. After the user has entered data, request that the
user enters Y or N to continue. If they enter N, print the list of
products and stock numbers to the screen. If they enter Y,
repeat the first step.
Your program should produce the following result:
*************************
Stock Manager
*************************
Product Name: Widgets
Stock Level: 14
Widgets has been entered with a stock of 14 products.
Do you wish to enter another record? (Y/N) Y
Product Name: Fidgets
Stock Level: 22
Fidgets has been entered with a stock of 22 products.
Do you wish to enter another record? (Y/N) N
-------------------------
Product Stock
-------------------------
Widgets 14
Fidgets 22
-------------------------
Stage 2: Validation and Totals
Building on stage 1, you now need to ensure that the program
checks for valid entries in each case, and converts the text to
the appropriate format.
You need to:
· Ensure that a stock number and product name were entered, If
any of these were not entered, do not record that item and go
straight to asking if they wish to continue.
· Ensure that the user enters either "Y", "y", "N" or "n" when
asked if they wish to continue. Continue to ask until they enter
a valid result.
· Ensure that the stock number is a number
· Output the total number of products held in stock
Sample output:
*************************
Stock Manager
*************************
Product Name: Widgets
Stock Level: 12
Widgets has been entered with a stock of 12 products.
Do you wish to enter another record? (Y/N)
Do you wish to enter another record? (Y/N) d
Do you wish to enter another record? (Y/N) y
Product Name:
Do you wish to enter another record? (Y/N) Y
Product Name: Fidgets
Stock Level: Twenty
Do you wish to enter another record? (Y/N) Y
Product Name: Fidgets
Stock Level: 20
Fidgets has been entered with a stock of 20 products.
Do you wish to enter another record? (Y/N) n
-------------------------
Product Stock
-------------------------
Widgets 12
Fidgets 20
-------------------------
Total 32
-------------------------
Stage 3: Product List and Menu
This involves three separate jobs:
· Create a menu with multiple options
· Add products separately and allow the user to select the
product.
· Allow multiple stock numbers to be entered for each product
and record the total
Sample Output
*************************
Stock Manager
*************************
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: A
-------------------------
Product name: Widgets
Widgets was added to the list of products.
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice:
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: a
-------------------------
Product name: Fidgets
Fidgets was added to the list of products.
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: i
-------------------------
Enter a product from the following list:
Widgets
Fidgets
Product name: Trees
*** Error: Product not listed
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: i
-------------------------
Enter a product from the following list:
Widgets
Fidgets
Product name: Widgets
Stock Level: 12
Widgets has has been updated to a stock of 12 products.
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: i
-------------------------
Enter a product from the following list:
Widgets
Fidgets
Product name: Widgets
Stock Level: 4
Widgets has has been updated to a stock of 16 products.
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: i
-------------------------
Enter a product from the following list:
Widgets
Fidgets
Product name: Fidgets
Stock Level:
*** Error: Incorrect value entered
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: i
-------------------------
Enter a product from the following list:
Widgets
Fidgets
Product name: Fidgets
Stock Level: 2
Fidgets has has been updated to a stock of 2 products.
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: l
-------------------------
Product Stock
-------------------------
Widgets 16
Fidgets 2
-------------------------
Total 18
-------------------------
-------------------------
Menu
-------------------------
(A)dd a product
(I)ncrease stock level
(L)ist products and stock
(Q)uit
-------------------------
Your choice: q
Goodbye
Stage 4: Importing, Exporting and Reporting
In the final stage we introduce the ability to load product lists,
export stock levels, and compare stock levels with expected
stock levels to generate a report. You will be provided with a
sample file for stock and a sample file to compare against.
This will require additional research into Python
Now that things are getting more complex, you are expected to
use functions to manage these tasks in your program.
Sample output:
*************************
Stock Manager
*************************
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: A
-------------------------
Product name: Widgets
Widgets was added to the list of products.
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: L
-------------------------
File to load: products.txt
3 records loaded
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: i
-------------------------
Enter a product from the following list:
Didgets
Lidgets
Hidgets
Widgets
Fidgets
Product name: Didgets
Stock Level: 5
Didgets has been updated to a stock of 5 products
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: i
-------------------------
Enter a product from the following list:
Didgets
Lidgets
Hidgets
Widgets
Fidgets
Product name: Widgets
Stock Level: 12
Widgets has has been updated to a stock of 12 products.
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: i
-------------------------
Enter a product from the following list:
Didgets
Lidgets
Hidgets
Widgets
Fidgets
Product name: Fidgets
Stock Level: 2
Fidgets has has been updated to a stock of 2 products.
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: R
-------------------------
Product Stock
-------------------------
Didgets 5
Lidgets 0
Hidgets 0
Widgets 16
Fidgets 2
-------------------------
Total 23
-------------------------
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: X
Filename: records.csv
Data exported as records.csv
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: C
Filename: Oldrecords.csv
----------------------------------------
Product Stock Old Change
----------------------------------------
Didgets 5 5 0
Lidgets 0 2 -2
Hidgets 0 0 0
Widgets 16 12 4
Fidgets 2 3 -1
----------------------------------------
Total 23 22 1
----------------------------------------
-------------------------
Menu
-------------------------
(A)dd a product
(L)oad product list
(I)ncrease stock level
(R)eport products and stock
(X)port products and stock
(C)ompare stock levels
(Q)uit
-------------------------
Your choice: q
Goodbye

More Related Content

Similar to Assignment 1Stock ManagementThe goal here is to write some sof.docx

AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification SolutionsAdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutionsjamieayre
 
Basic Handover of Bill of Material(2).docx
Basic Handover of Bill of Material(2).docxBasic Handover of Bill of Material(2).docx
Basic Handover of Bill of Material(2).docxDipak Banerjee
 
Software Development Life Cycle Testingtypes
Software Development Life Cycle TestingtypesSoftware Development Life Cycle Testingtypes
Software Development Life Cycle Testingtypesvladimir zaremba
 
2F9_S4HANA2020_BPD_EN_US.docx
2F9_S4HANA2020_BPD_EN_US.docx2F9_S4HANA2020_BPD_EN_US.docx
2F9_S4HANA2020_BPD_EN_US.docxArun Obilisetty
 
Mgt4059 advanced operations management complete course
Mgt4059 advanced operations management   complete courseMgt4059 advanced operations management   complete course
Mgt4059 advanced operations management complete coursehomeworkecrater
 
PRG 420 NERD Redefined Education--prg420nerd.com
PRG 420 NERD Redefined Education--prg420nerd.comPRG 420 NERD Redefined Education--prg420nerd.com
PRG 420 NERD Redefined Education--prg420nerd.comclaric213
 
C programming session 07
C programming session 07C programming session 07
C programming session 07Dushmanta Nath
 
VISWAPAVAN _2015_v1
VISWAPAVAN _2015_v1VISWAPAVAN _2015_v1
VISWAPAVAN _2015_v1viswa pavan
 
(Lab Project) (2)Table of ContentsIntroduction.docx
 (Lab Project) (2)Table of ContentsIntroduction.docx (Lab Project) (2)Table of ContentsIntroduction.docx
(Lab Project) (2)Table of ContentsIntroduction.docxaryan532920
 
C programming session 10
C programming session 10C programming session 10
C programming session 10Vivek Singh
 
SAP SD QUERY REPORT_GANESH
SAP SD QUERY REPORT_GANESHSAP SD QUERY REPORT_GANESH
SAP SD QUERY REPORT_GANESHGanesh Tarlana
 
ICT104 Programming Assignment Compiled By Divya Lee.docx
ICT104 Programming Assignment  Compiled By Divya Lee.docxICT104 Programming Assignment  Compiled By Divya Lee.docx
ICT104 Programming Assignment Compiled By Divya Lee.docxtarifarmarie
 
Omnichannel Convergent Billing.pdf
Omnichannel Convergent Billing.pdfOmnichannel Convergent Billing.pdf
Omnichannel Convergent Billing.pdfAmitKumarbishoyi2
 
Lifetime total cost of ownership of an Application
Lifetime total cost of ownership of an ApplicationLifetime total cost of ownership of an Application
Lifetime total cost of ownership of an ApplicationAspire Systems
 
PIDtuningsoftwareApracticalreview.pdf
PIDtuningsoftwareApracticalreview.pdfPIDtuningsoftwareApracticalreview.pdf
PIDtuningsoftwareApracticalreview.pdfAbdulSalamSagir1
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEWshyamuopeight
 

Similar to Assignment 1Stock ManagementThe goal here is to write some sof.docx (20)

AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification SolutionsAdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
AdaCore Paris Tech Day 2016: Eric Perlade - Verification Solutions
 
Basic Handover of Bill of Material(2).docx
Basic Handover of Bill of Material(2).docxBasic Handover of Bill of Material(2).docx
Basic Handover of Bill of Material(2).docx
 
Software Development Life Cycle Testingtypes
Software Development Life Cycle TestingtypesSoftware Development Life Cycle Testingtypes
Software Development Life Cycle Testingtypes
 
2F9_S4HANA2020_BPD_EN_US.docx
2F9_S4HANA2020_BPD_EN_US.docx2F9_S4HANA2020_BPD_EN_US.docx
2F9_S4HANA2020_BPD_EN_US.docx
 
Mgt4059 advanced operations management complete course
Mgt4059 advanced operations management   complete courseMgt4059 advanced operations management   complete course
Mgt4059 advanced operations management complete course
 
PRG 420 NERD Redefined Education--prg420nerd.com
PRG 420 NERD Redefined Education--prg420nerd.comPRG 420 NERD Redefined Education--prg420nerd.com
PRG 420 NERD Redefined Education--prg420nerd.com
 
C programming session 07
C programming session 07C programming session 07
C programming session 07
 
Input output
Input outputInput output
Input output
 
VISWAPAVAN _2015_v1
VISWAPAVAN _2015_v1VISWAPAVAN _2015_v1
VISWAPAVAN _2015_v1
 
(Lab Project) (2)Table of ContentsIntroduction.docx
 (Lab Project) (2)Table of ContentsIntroduction.docx (Lab Project) (2)Table of ContentsIntroduction.docx
(Lab Project) (2)Table of ContentsIntroduction.docx
 
C programming session 10
C programming session 10C programming session 10
C programming session 10
 
SAP SD QUERY REPORT_GANESH
SAP SD QUERY REPORT_GANESHSAP SD QUERY REPORT_GANESH
SAP SD QUERY REPORT_GANESH
 
Thirupathi
ThirupathiThirupathi
Thirupathi
 
ICT104 Programming Assignment Compiled By Divya Lee.docx
ICT104 Programming Assignment  Compiled By Divya Lee.docxICT104 Programming Assignment  Compiled By Divya Lee.docx
ICT104 Programming Assignment Compiled By Divya Lee.docx
 
Omnichannel Convergent Billing.pdf
Omnichannel Convergent Billing.pdfOmnichannel Convergent Billing.pdf
Omnichannel Convergent Billing.pdf
 
Software Sizing
Software SizingSoftware Sizing
Software Sizing
 
Lifetime total cost of ownership of an Application
Lifetime total cost of ownership of an ApplicationLifetime total cost of ownership of an Application
Lifetime total cost of ownership of an Application
 
PIDtuningsoftwareApracticalreview.pdf
PIDtuningsoftwareApracticalreview.pdfPIDtuningsoftwareApracticalreview.pdf
PIDtuningsoftwareApracticalreview.pdf
 
COMP 122 Entire Course NEW
COMP 122 Entire Course NEWCOMP 122 Entire Course NEW
COMP 122 Entire Course NEW
 
Sap pm-master-data
Sap pm-master-dataSap pm-master-data
Sap pm-master-data
 

More from salmonpybus

Discuss how a successful organization should have the followin.docx
Discuss how a successful organization should have the followin.docxDiscuss how a successful organization should have the followin.docx
Discuss how a successful organization should have the followin.docxsalmonpybus
 
Discuss how portrayals of violence in different media may affect hum.docx
Discuss how portrayals of violence in different media may affect hum.docxDiscuss how portrayals of violence in different media may affect hum.docx
Discuss how portrayals of violence in different media may affect hum.docxsalmonpybus
 
Discuss how culture affects health physical and psychological healt.docx
Discuss how culture affects health physical and psychological healt.docxDiscuss how culture affects health physical and psychological healt.docx
Discuss how culture affects health physical and psychological healt.docxsalmonpybus
 
Discuss how business use Access Control to protect their informa.docx
Discuss how business use Access Control to protect their informa.docxDiscuss how business use Access Control to protect their informa.docx
Discuss how business use Access Control to protect their informa.docxsalmonpybus
 
Discuss how or if post-Civil War America was truly a period of r.docx
Discuss how or if post-Civil War America was truly a period of r.docxDiscuss how or if post-Civil War America was truly a period of r.docx
Discuss how or if post-Civil War America was truly a period of r.docxsalmonpybus
 
Discuss how partnerships are created through team development..docx
Discuss how partnerships are created through team development..docxDiscuss how partnerships are created through team development..docx
Discuss how partnerships are created through team development..docxsalmonpybus
 
discuss how health and illness beliefs can influence the assessment .docx
discuss how health and illness beliefs can influence the assessment .docxdiscuss how health and illness beliefs can influence the assessment .docx
discuss how health and illness beliefs can influence the assessment .docxsalmonpybus
 
Discuss how geopolitical and phenomenological place influence the .docx
Discuss how geopolitical and phenomenological place influence the .docxDiscuss how geopolitical and phenomenological place influence the .docx
Discuss how geopolitical and phenomenological place influence the .docxsalmonpybus
 
Discuss how each of these factors (inflation, changing population de.docx
Discuss how each of these factors (inflation, changing population de.docxDiscuss how each of these factors (inflation, changing population de.docx
Discuss how each of these factors (inflation, changing population de.docxsalmonpybus
 
Discuss Five (5)  database membersobjects of NoSQL. Why is NoSQL is.docx
Discuss Five (5)  database membersobjects of NoSQL. Why is NoSQL is.docxDiscuss Five (5)  database membersobjects of NoSQL. Why is NoSQL is.docx
Discuss Five (5)  database membersobjects of NoSQL. Why is NoSQL is.docxsalmonpybus
 
Discuss how business use Access Control to protect their information.docx
Discuss how business use Access Control to protect their information.docxDiscuss how business use Access Control to protect their information.docx
Discuss how business use Access Control to protect their information.docxsalmonpybus
 
Discuss how and why companies use cryptography.Length, 2 – 3 pag.docx
Discuss how and why companies use cryptography.Length, 2 – 3 pag.docxDiscuss how and why companies use cryptography.Length, 2 – 3 pag.docx
Discuss how and why companies use cryptography.Length, 2 – 3 pag.docxsalmonpybus
 
Discuss how and why companies use cryptography.Length, 2 pages..docx
Discuss how and why companies use cryptography.Length, 2 pages..docxDiscuss how and why companies use cryptography.Length, 2 pages..docx
Discuss how and why companies use cryptography.Length, 2 pages..docxsalmonpybus
 
Discuss how an object must be an expert on certain sets of informati.docx
Discuss how an object must be an expert on certain sets of informati.docxDiscuss how an object must be an expert on certain sets of informati.docx
Discuss how an object must be an expert on certain sets of informati.docxsalmonpybus
 
Discuss how Angela Davis, Patricia Collins, andor The Combahee Rive.docx
Discuss how Angela Davis, Patricia Collins, andor The Combahee Rive.docxDiscuss how Angela Davis, Patricia Collins, andor The Combahee Rive.docx
Discuss how Angela Davis, Patricia Collins, andor The Combahee Rive.docxsalmonpybus
 
Discuss how Biblical worldview provides guidance to the Christian he.docx
Discuss how Biblical worldview provides guidance to the Christian he.docxDiscuss how Biblical worldview provides guidance to the Christian he.docx
Discuss how Biblical worldview provides guidance to the Christian he.docxsalmonpybus
 
Discuss how an IPSIDS can protect user information on a Windows sys.docx
Discuss how an IPSIDS can protect user information on a Windows sys.docxDiscuss how an IPSIDS can protect user information on a Windows sys.docx
Discuss how an IPSIDS can protect user information on a Windows sys.docxsalmonpybus
 
discuss how a particular human-computer interface might impact a per.docx
discuss how a particular human-computer interface might impact a per.docxdiscuss how a particular human-computer interface might impact a per.docx
discuss how a particular human-computer interface might impact a per.docxsalmonpybus
 
Discuss Fluid Volume Excess. Describe the imbalance, identify typ.docx
Discuss Fluid Volume Excess. Describe the imbalance, identify typ.docxDiscuss Fluid Volume Excess. Describe the imbalance, identify typ.docx
Discuss Fluid Volume Excess. Describe the imbalance, identify typ.docxsalmonpybus
 
Discuss emerging trends in the use of Internet currency such as Bitc.docx
Discuss emerging trends in the use of Internet currency such as Bitc.docxDiscuss emerging trends in the use of Internet currency such as Bitc.docx
Discuss emerging trends in the use of Internet currency such as Bitc.docxsalmonpybus
 

More from salmonpybus (20)

Discuss how a successful organization should have the followin.docx
Discuss how a successful organization should have the followin.docxDiscuss how a successful organization should have the followin.docx
Discuss how a successful organization should have the followin.docx
 
Discuss how portrayals of violence in different media may affect hum.docx
Discuss how portrayals of violence in different media may affect hum.docxDiscuss how portrayals of violence in different media may affect hum.docx
Discuss how portrayals of violence in different media may affect hum.docx
 
Discuss how culture affects health physical and psychological healt.docx
Discuss how culture affects health physical and psychological healt.docxDiscuss how culture affects health physical and psychological healt.docx
Discuss how culture affects health physical and psychological healt.docx
 
Discuss how business use Access Control to protect their informa.docx
Discuss how business use Access Control to protect their informa.docxDiscuss how business use Access Control to protect their informa.docx
Discuss how business use Access Control to protect their informa.docx
 
Discuss how or if post-Civil War America was truly a period of r.docx
Discuss how or if post-Civil War America was truly a period of r.docxDiscuss how or if post-Civil War America was truly a period of r.docx
Discuss how or if post-Civil War America was truly a period of r.docx
 
Discuss how partnerships are created through team development..docx
Discuss how partnerships are created through team development..docxDiscuss how partnerships are created through team development..docx
Discuss how partnerships are created through team development..docx
 
discuss how health and illness beliefs can influence the assessment .docx
discuss how health and illness beliefs can influence the assessment .docxdiscuss how health and illness beliefs can influence the assessment .docx
discuss how health and illness beliefs can influence the assessment .docx
 
Discuss how geopolitical and phenomenological place influence the .docx
Discuss how geopolitical and phenomenological place influence the .docxDiscuss how geopolitical and phenomenological place influence the .docx
Discuss how geopolitical and phenomenological place influence the .docx
 
Discuss how each of these factors (inflation, changing population de.docx
Discuss how each of these factors (inflation, changing population de.docxDiscuss how each of these factors (inflation, changing population de.docx
Discuss how each of these factors (inflation, changing population de.docx
 
Discuss Five (5)  database membersobjects of NoSQL. Why is NoSQL is.docx
Discuss Five (5)  database membersobjects of NoSQL. Why is NoSQL is.docxDiscuss Five (5)  database membersobjects of NoSQL. Why is NoSQL is.docx
Discuss Five (5)  database membersobjects of NoSQL. Why is NoSQL is.docx
 
Discuss how business use Access Control to protect their information.docx
Discuss how business use Access Control to protect their information.docxDiscuss how business use Access Control to protect their information.docx
Discuss how business use Access Control to protect their information.docx
 
Discuss how and why companies use cryptography.Length, 2 – 3 pag.docx
Discuss how and why companies use cryptography.Length, 2 – 3 pag.docxDiscuss how and why companies use cryptography.Length, 2 – 3 pag.docx
Discuss how and why companies use cryptography.Length, 2 – 3 pag.docx
 
Discuss how and why companies use cryptography.Length, 2 pages..docx
Discuss how and why companies use cryptography.Length, 2 pages..docxDiscuss how and why companies use cryptography.Length, 2 pages..docx
Discuss how and why companies use cryptography.Length, 2 pages..docx
 
Discuss how an object must be an expert on certain sets of informati.docx
Discuss how an object must be an expert on certain sets of informati.docxDiscuss how an object must be an expert on certain sets of informati.docx
Discuss how an object must be an expert on certain sets of informati.docx
 
Discuss how Angela Davis, Patricia Collins, andor The Combahee Rive.docx
Discuss how Angela Davis, Patricia Collins, andor The Combahee Rive.docxDiscuss how Angela Davis, Patricia Collins, andor The Combahee Rive.docx
Discuss how Angela Davis, Patricia Collins, andor The Combahee Rive.docx
 
Discuss how Biblical worldview provides guidance to the Christian he.docx
Discuss how Biblical worldview provides guidance to the Christian he.docxDiscuss how Biblical worldview provides guidance to the Christian he.docx
Discuss how Biblical worldview provides guidance to the Christian he.docx
 
Discuss how an IPSIDS can protect user information on a Windows sys.docx
Discuss how an IPSIDS can protect user information on a Windows sys.docxDiscuss how an IPSIDS can protect user information on a Windows sys.docx
Discuss how an IPSIDS can protect user information on a Windows sys.docx
 
discuss how a particular human-computer interface might impact a per.docx
discuss how a particular human-computer interface might impact a per.docxdiscuss how a particular human-computer interface might impact a per.docx
discuss how a particular human-computer interface might impact a per.docx
 
Discuss Fluid Volume Excess. Describe the imbalance, identify typ.docx
Discuss Fluid Volume Excess. Describe the imbalance, identify typ.docxDiscuss Fluid Volume Excess. Describe the imbalance, identify typ.docx
Discuss Fluid Volume Excess. Describe the imbalance, identify typ.docx
 
Discuss emerging trends in the use of Internet currency such as Bitc.docx
Discuss emerging trends in the use of Internet currency such as Bitc.docxDiscuss emerging trends in the use of Internet currency such as Bitc.docx
Discuss emerging trends in the use of Internet currency such as Bitc.docx
 

Recently uploaded

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsKarakKing
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the ClassroomPooky Knightsmith
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptxJoelynRubio1
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...Nguyen Thanh Tu Collection
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxJisc
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Pooja Bhuva
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 

Recently uploaded (20)

How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx21st_Century_Skills_Framework_Final_Presentation_2.pptx
21st_Century_Skills_Framework_Final_Presentation_2.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 

Assignment 1Stock ManagementThe goal here is to write some sof.docx

  • 1. Assignment 1 Stock Management The goal here is to write some software that would assist a retail store manage their stock levels. The assignment will get progressively more complex as it proceeds - the early stages will be reasonable straight forward and will be sufficient for a passing grade, and the more advanced stages are for those who wish to go further and target a higher overall result. General Requirements All assignments should be written in Python 3 and should run in IDLE. They can be written on any type of computer, but they should be able to be executed in the computer pool. The highest marks will be for working code. However, in cases where there are problems, you will be assigned marks for how you approached the task. It is also expected that you will provide comments in the programs to explain how it works, and these comments will account for up to 10% of the overall grade. In each case example output is given. You should try and make your output and process match the example as closely as possible. Stage 1: Data Entry Write a program which requests that requests a product name and a stock number. Store that data in a List or a Dictionary. After the user has entered data, request that the user enters Y or N to continue. If they enter N, print the list of products and stock numbers to the screen. If they enter Y, repeat the first step. Your program should produce the following result: ************************* Stock Manager ************************* Product Name: Widgets Stock Level: 14
  • 2. Widgets has been entered with a stock of 14 products. Do you wish to enter another record? (Y/N) Y Product Name: Fidgets Stock Level: 22 Fidgets has been entered with a stock of 22 products. Do you wish to enter another record? (Y/N) N ------------------------- Product Stock ------------------------- Widgets 14 Fidgets 22 ------------------------- Stage 2: Validation and Totals Building on stage 1, you now need to ensure that the program checks for valid entries in each case, and converts the text to the appropriate format. You need to: · Ensure that a stock number and product name were entered, If any of these were not entered, do not record that item and go straight to asking if they wish to continue. · Ensure that the user enters either "Y", "y", "N" or "n" when asked if they wish to continue. Continue to ask until they enter a valid result. · Ensure that the stock number is a number · Output the total number of products held in stock Sample output: ************************* Stock Manager ************************* Product Name: Widgets Stock Level: 12 Widgets has been entered with a stock of 12 products.
  • 3. Do you wish to enter another record? (Y/N) Do you wish to enter another record? (Y/N) d Do you wish to enter another record? (Y/N) y Product Name: Do you wish to enter another record? (Y/N) Y Product Name: Fidgets Stock Level: Twenty Do you wish to enter another record? (Y/N) Y Product Name: Fidgets Stock Level: 20 Fidgets has been entered with a stock of 20 products. Do you wish to enter another record? (Y/N) n ------------------------- Product Stock ------------------------- Widgets 12 Fidgets 20 ------------------------- Total 32 ------------------------- Stage 3: Product List and Menu This involves three separate jobs: · Create a menu with multiple options · Add products separately and allow the user to select the product. · Allow multiple stock numbers to be entered for each product and record the total Sample Output
  • 4. ************************* Stock Manager ************************* ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: A ------------------------- Product name: Widgets Widgets was added to the list of products. ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit
  • 5. ------------------------- Your choice: a ------------------------- Product name: Fidgets Fidgets was added to the list of products. ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: i ------------------------- Enter a product from the following list: Widgets Fidgets Product name: Trees *** Error: Product not listed ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: i ------------------------- Enter a product from the following list:
  • 6. Widgets Fidgets Product name: Widgets Stock Level: 12 Widgets has has been updated to a stock of 12 products. ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: i ------------------------- Enter a product from the following list: Widgets Fidgets Product name: Widgets Stock Level: 4 Widgets has has been updated to a stock of 16 products. ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: i ------------------------- Enter a product from the following list:
  • 7. Widgets Fidgets Product name: Fidgets Stock Level: *** Error: Incorrect value entered ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: i ------------------------- Enter a product from the following list: Widgets Fidgets Product name: Fidgets Stock Level: 2 Fidgets has has been updated to a stock of 2 products. ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: l ------------------------- Product Stock
  • 8. ------------------------- Widgets 16 Fidgets 2 ------------------------- Total 18 ------------------------- ------------------------- Menu ------------------------- (A)dd a product (I)ncrease stock level (L)ist products and stock (Q)uit ------------------------- Your choice: q Goodbye Stage 4: Importing, Exporting and Reporting In the final stage we introduce the ability to load product lists, export stock levels, and compare stock levels with expected stock levels to generate a report. You will be provided with a sample file for stock and a sample file to compare against. This will require additional research into Python Now that things are getting more complex, you are expected to use functions to manage these tasks in your program. Sample output: ************************* Stock Manager ************************* ------------------------- Menu ------------------------- (A)dd a product (L)oad product list
  • 9. (I)ncrease stock level (R)eport products and stock (X)port products and stock (C)ompare stock levels (Q)uit ------------------------- Your choice: A ------------------------- Product name: Widgets Widgets was added to the list of products. ------------------------- Menu ------------------------- (A)dd a product (L)oad product list (I)ncrease stock level (R)eport products and stock (X)port products and stock (C)ompare stock levels (Q)uit ------------------------- Your choice: L ------------------------- File to load: products.txt 3 records loaded ------------------------- Menu ------------------------- (A)dd a product (L)oad product list (I)ncrease stock level (R)eport products and stock
  • 10. (X)port products and stock (C)ompare stock levels (Q)uit ------------------------- Your choice: i ------------------------- Enter a product from the following list: Didgets Lidgets Hidgets Widgets Fidgets Product name: Didgets Stock Level: 5 Didgets has been updated to a stock of 5 products ------------------------- Menu ------------------------- (A)dd a product (L)oad product list (I)ncrease stock level (R)eport products and stock (X)port products and stock (C)ompare stock levels (Q)uit ------------------------- Your choice: i ------------------------- Enter a product from the following list: Didgets Lidgets Hidgets Widgets
  • 11. Fidgets Product name: Widgets Stock Level: 12 Widgets has has been updated to a stock of 12 products. ------------------------- Menu ------------------------- (A)dd a product (L)oad product list (I)ncrease stock level (R)eport products and stock (X)port products and stock (C)ompare stock levels (Q)uit ------------------------- Your choice: i ------------------------- Enter a product from the following list: Didgets Lidgets Hidgets Widgets Fidgets Product name: Fidgets Stock Level: 2 Fidgets has has been updated to a stock of 2 products. ------------------------- Menu ------------------------- (A)dd a product (L)oad product list (I)ncrease stock level (R)eport products and stock
  • 12. (X)port products and stock (C)ompare stock levels (Q)uit ------------------------- Your choice: R ------------------------- Product Stock ------------------------- Didgets 5 Lidgets 0 Hidgets 0 Widgets 16 Fidgets 2 ------------------------- Total 23 ------------------------- ------------------------- Menu ------------------------- (A)dd a product (L)oad product list (I)ncrease stock level (R)eport products and stock (X)port products and stock (C)ompare stock levels (Q)uit ------------------------- Your choice: X Filename: records.csv Data exported as records.csv ------------------------- Menu
  • 13. ------------------------- (A)dd a product (L)oad product list (I)ncrease stock level (R)eport products and stock (X)port products and stock (C)ompare stock levels (Q)uit ------------------------- Your choice: C Filename: Oldrecords.csv ---------------------------------------- Product Stock Old Change ---------------------------------------- Didgets 5 5 0 Lidgets 0 2 -2 Hidgets 0 0 0 Widgets 16 12 4 Fidgets 2 3 -1 ---------------------------------------- Total 23 22 1 ---------------------------------------- ------------------------- Menu ------------------------- (A)dd a product (L)oad product list (I)ncrease stock level (R)eport products and stock (X)port products and stock (C)ompare stock levels (Q)uit -------------------------