Graded Project 1: Grocery Store
For this project, create a grocery store system. Users of the system can choose how many items they want to buy and then are told how much they owe. Users will have the option of buying apples and oranges. Here are some parameters that your program should include:
* Program should ask users how many apples and oranges they want to buy.
* Apples cost $1.00 and Oranges cost $1.50.
* Today's Special! Apples are 2 for 1. Buy one get one free! (1 apple = $1.00, 2 apples = $1.00, 3 apples = $2.00, 4 apples = $2.00, etc.)
* Another Special! How ever many oranges you buy will give you the same number of percentage off your total bill. (If you buy 10 oranges you get 10% off your total bill.) (For now, ask the user to enter a number between 1 and 100. If they don't the numbers will not make sense. Later we will learn how to capture user input errors.
* If you have bought 2 apples = $1.00 and 10 oranges = $15.00 your total bill would be $16.00. But you get 10% off! (use percentage/100*amount = discount amount) 10% of $16.00 = (10/100) * 16.00 = $1.60 discount. Total bill = $16.00 - $1.60 = $14.40
* Your program should tell the user how much they owe."
alright this is the project im working on now. i am almost done, actually everything is done except for the the things in bold. (there is more to the project but i just pasted the part i need help with). how would i make it recognize that you get 2 apples for 1.00 (currently i have it set up so 1 apple is 1.00, but i have a second variable called freeapple, and i thought about making it 1 apple for 50 cents, so when u buy 2 it cost a dollar, but that wouldnt look good)......and i have no idea about the second problem i have, with the discount, any help would be appreciated.
im not asking u to do this for me, just try to explain or give me a example on how i would do the 2 things im having trouble with.