Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

PLEASE HELP WITH THIS FLOWCHART PYTHON PROBLEM, flowchart with the code would be helpful

Q1 (Continued)
Total purchase amount : RM
64.47
Rounding adjustment
Total amount to pay
RM
-0.02
: RM
64.45
Note: Only techmiques/methods/flowchart symbols learned in this course such as
input/output(parallelogram), process/function(rectangle), decision (diamond), on-page
and off-page connectors, start/end (terminator) and specific arrows are allowed in this
algorithm. It is optional/not compulsory to apply self- or user-defined function.
Transcribed Image Text:Q1 (Continued) Total purchase amount : RM 64.47 Rounding adjustment Total amount to pay RM -0.02 : RM 64.45 Note: Only techmiques/methods/flowchart symbols learned in this course such as input/output(parallelogram), process/function(rectangle), decision (diamond), on-page and off-page connectors, start/end (terminator) and specific arrows are allowed in this algorithm. It is optional/not compulsory to apply self- or user-defined function.
Practice question 1 (using python program)
Construct a FLOWCHART for a Point-of-Sales (POS) system that takes in customers
purchases by registering each of the products he/she brought forward to the counter for
payment. For each of the product codes entered, the system is to validate if it is a valid
code and display an error message "Invalid product code" if it is not. The cashier will
need to enter a valid code before the system proceeds to display the description of the
product, price of the product and prompt for the entry of the quantity of similar items
purchased. An error message "Invalid quantity entered" is displayed if the entered value
is not of the type “Integer". The entry of the product code and quantity into the system
will continue until a sentinel of "Q" is reached for the code. The system computes and
outputs the following information.
Total purchase amount
Rounding adjustment to the nearest 5 cents
• Total amount to pay
Q1.
Refer to Table 1.1 and the sample output for more details on how the system is to be
operated on.
Table 1.1
Product Code
1001
Product Description
USB-C 3A 0.1M FC Cable
Price (RM)
4.95
1002
USB-C 5A 0.1M FC Cable
6.35
1003
1004
1005
USB 2A 0.1M Cable
USB 3A 0.2M FC Cable
USB-C 3A 0.5M FC Cable
2.19
4.99
8.19
Sample output:
Enter product code >> 1001
USB-C 3A 0.IM FC Cable (RM4.95)
Enter quantity
>> 10
Enter product code >> 100345
Invalid product code
Enter product code >> 1004
USB 3A 0.2M FC Cable (RM4.99)
Enter quantity
>> 100SD
Invalid quantity entered
Enter product code >> 1004
USB-C 3A 0.1M FC Cable (RM4.95)
Enter quantity
>> 3
Enter product code >> Q
Transcribed Image Text:Practice question 1 (using python program) Construct a FLOWCHART for a Point-of-Sales (POS) system that takes in customers purchases by registering each of the products he/she brought forward to the counter for payment. For each of the product codes entered, the system is to validate if it is a valid code and display an error message "Invalid product code" if it is not. The cashier will need to enter a valid code before the system proceeds to display the description of the product, price of the product and prompt for the entry of the quantity of similar items purchased. An error message "Invalid quantity entered" is displayed if the entered value is not of the type “Integer". The entry of the product code and quantity into the system will continue until a sentinel of "Q" is reached for the code. The system computes and outputs the following information. Total purchase amount Rounding adjustment to the nearest 5 cents • Total amount to pay Q1. Refer to Table 1.1 and the sample output for more details on how the system is to be operated on. Table 1.1 Product Code 1001 Product Description USB-C 3A 0.1M FC Cable Price (RM) 4.95 1002 USB-C 5A 0.1M FC Cable 6.35 1003 1004 1005 USB 2A 0.1M Cable USB 3A 0.2M FC Cable USB-C 3A 0.5M FC Cable 2.19 4.99 8.19 Sample output: Enter product code >> 1001 USB-C 3A 0.IM FC Cable (RM4.95) Enter quantity >> 10 Enter product code >> 100345 Invalid product code Enter product code >> 1004 USB 3A 0.2M FC Cable (RM4.99) Enter quantity >> 100SD Invalid quantity entered Enter product code >> 1004 USB-C 3A 0.1M FC Cable (RM4.95) Enter quantity >> 3 Enter product code >> Q
Expert Solution
steps

Step by step

Solved in 2 steps with 5 images

Blurred answer
Knowledge Booster
Binary numbers
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education