Create the follow program using Raptor or Python (if you do with both python and raptor correctly,
Fantastic news! We've Found the answer you've been seeking!
Question:
A retail price for each basket ball is $2.99/each. program to figure it out the final bill for each customer after discount (if applicable)
+ Customers buy less than 5 balls, there will be no discount.
+ Customers buy >= 5 and less than 10 balls, there will be 10% discount.
+ Customers buy >= 10 and less than 20 balls, there will be 20% discount.
+ Customers buy >= 20 and less than 30 balls, there will be 30% discount.
+ Customers buy >= 30 balls, there will be 40% discount.
program to:
Get input from users for a list of customer's names, each customer with a specific quantity ordered, store names and quantities into parallel arrays named customers and quantities. End the input with a sentinel value. Apply the defensive technique to verify input quantities are positive integer numbers (Hint: Read slides for module 5 to know more about defensive technique and input validation).
After completing all the inputs, your program will figure it out the discount rate of each customer and the final bill for each of them (after discount). The output will be customer names, quantities ordered, discount rates, and final bill
Example: Name: Adam, Quantities Ordered: 4, Discount Rate: 0%, Final Bill: $11.96
Hint: Again, you maintain a 2 parallel arrays (QUAN_LIMITS and DISCOUNTS), apply what you studied in module 6 with parallel arrays and ranges:
To get maximum point, you have to use input validation (quantities must be positive integer numbers ) and use searching an array for a range match (NOT nested selection).
SUBMISSION:
1. Submit your source code file either in raptor file (*.rap) or python file (*.py) or both.
2. In case you work with python, you also have to submit screen shots demonstrating your program works correctly. Any program that requires user input should be run a minimum of three times with varying test values.
Documentation is very important for this course and in the field. For all Raptor and all programs, an expectation is that comments will be incorporated into all assignments. For this assignment only the header comments will be required. Both header comments and step comments are encouraged as it will help for logic to be better. Header comments should include the following:
Name of the submission
Author of the submission
Summary/goal of the submission
Variables used with a short description of the variable, as well as the format of the data (e.g. datatype)
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: