d2jsp
Log InRegister
d2jsp Forums > Off-Topic > General Chat > Homework Help > Anyone Good In Python Coding > I Have A Pretty Simple One...
Add Reply New Topic New Poll
Member
Posts: 16,455
Joined: May 2 2007
Gold: 20.17
Jun 20 2015 12:17pm
it shouldn't take too long to do, but if someone is good in python i need this pizza place app coded, ill pay 300fg if someone wants to do it. needs to be done within the next few hours though. lmk

just the python code is needed.

here's the problem.

Mackey’s Pizza
A good friend of yours, Mack, just opened a pizzeria. Much like some of the other pizzeria’s around town, he wishes to create a mobile app that will allow a customer to create the perfect pizza. The app will allow the user to select the size of the pizza, square or round and then all of the items they wish on the pizza. When the user has finished running the app, they will see what they ordered and the total price.
After meeting with Mack, he has given you the following prices for his pizza app:
Pizza sizes:
Small Medium Large Extra Large
Round 5.95 7.95 9.95 11.95
Square` 6.95 8.95 10.95 12.95

Toppings:
Item Price
Meats: $1.50 per item
Veggies: $1.00 per item
Extra Cheese $1.25

Additionally Mack wants this app to do the following:
When the app starts up he wants a display welcoming the user to the pizzeria.
There should then be a question asking the users the type of pizza, round or square and then the size.
After determining the size, the app needs to ask what toppings. The app should display a ‘menu’ of sorts to list the choice of a meat topping, veggie topping or extra cheese, so the user knows how to enter them. The app needs to keep asking about toppings until the user is done adding the toppings.
When the user is done adding toppings, the program needs to calculate the subtotal tax and total. Assume sales tax is 6%.
At the end the program needs to print out the pizza base cost, total toppings cost, subtotal, tax and total.
Member
Posts: 32,925
Joined: Jul 23 2006
Gold: 3,804.50
Jun 20 2015 01:20pm
IMO you're underpaying for a rush job. have fun though.
Member
Posts: 16,455
Joined: May 2 2007
Gold: 20.17
Jun 20 2015 01:28pm
Quote (carteblanche @ Jun 20 2015 02:20pm)
IMO you're underpaying for a rush job. have fun though.


i can always just do it, lol just figured id offer up jsp some fg for it, ive got till midnight to turn it in and ive got it started but if anyone does it and finishes it ill pay :)
Member
Posts: 55,688
Joined: Jun 8 2006
Gold: 7.00
Jun 20 2015 03:17pm
Quote (Drakwen @ 20 Jun 2015 21:28)
i can always just do it, lol just figured id offer up jsp some fg for it, ive got till midnight to turn it in and ive got it started but if anyone does it and finishes it ill pay :)


If you could do it, you'd have done it already.
Member
Posts: 16,455
Joined: May 2 2007
Gold: 20.17
Jun 20 2015 03:25pm
Quote (Lensherr @ Jun 20 2015 04:17pm)
If you could do it, you'd have done it already.


And now I have, was just some simple shit, declared variables used some simple if commands and a loop for the toppings, thanks though jsp, this can be closed
Member
Posts: 16,455
Joined: May 2 2007
Gold: 20.17
Jun 20 2015 07:48pm
in case anyone was interested in what was written, this is how i did it... i figured 300fg just to make this little program was good lol its like 1page of code... i didnt even ask for it to be commented lol

Code
toppingselection = "" #declaration as a string
pizzatype = "" #declaration as a string
pizzasize = "" #declaration as a string
sizetypecost = 0.0 #declaration as a float
tax = 0.0 #declaration as a float
toppings = 0.0 #declaration as a float
subtotal = 0.0 #declaration as a float
totalprice = 0.0 #declaration as a float
print ("Welcome to the Mackey's Pizza app, this app will calculate the price of your pizza based on what you order") #Welcome message
pizzatype = str(input("Please Enter Pizza Type\n\tR for round\n\tS for square ")) #Input for pizzatype variable
pizzasize = str(input("Please Enter the size of your pizza:\n\tSmall - S\n\tMedium - M\n\tLarge - L\n\tExtra Large - XL: "))#input for pizzasize variable
if pizzatype == "R" and pizzasize == "S":#if statement that decides how much the sizetypecost will be
sizetypecost = 5.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "M":#elif statement that decides how much the sizetypecost will be
sizetypecost = 7.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "L":#elif statement that decides how much the sizetypecost will be
sizetypecost = 9.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "XL":#elif statement that decides how much the sizetypecost will be
sizetypecost = 11.95 #set sizetypecost
elif pizzatype =="S" and pizzasize == "S":#elif statement that decides how much the sizetypecost will be
sizetypecost = 6.95 #set sizetypecost
elif pizzatype =="S" and pizzasize == "M":#elif statement that decides how much the sizetypecost will be
sizetypecost = 8.95 #set sizetypecost
elif pizzatype == "S" and pizzasize == "L":#elif statement that decides how much the sizetypecost will be
sizetypecost = 10.95 #set sizetypecost
elif pizzatype == "S" and pizzasize == "XL":#elif statement that decides how much the sizetypecost will be
sizetypecost = 12.95 #set sizetypecost

while toppingselection != "E":#toppingselection loop, will end if E is entered
toppingselection = str(input("Please enter what type of toppings you would like\n\tM for meats such as peperoni, sausage, etc...\n\tV for veggies\n\tC for extra cheese\n\tE if you are done selecting toppings."))#input for toppingselection
if toppingselection == "M":#if statement for toppingselection = M
toppings = toppings+1.50 #topping adds 1.50 to total of toppings if selection is M
elif toppingselection == "V":#elif statement for toppingselection = V
toppings = toppings+1.00#topping adds 1.00 to total of toppings if selection is V
elif toppingselection == "C":#elif statement for toppingselection = C
toppings = toppings+1.25#topping adds 1.25 to total of toppings if selection is C
subtotal = toppings+sizetypecost#subtotal formula
tax = (toppings+sizetypecost)*.06#tax formula
totalprice = toppings+sizetypecost+tax#totalprice formula
print ("---------------------------------------------------")#print statement to make this look nice
print ("\tThe pizza you selected costs: \t$",format(sizetypecost, '.2f'))#formatted print statement for sizetypecost
print ("\tThe toppings you ordered cost: \t$",format(toppings, '.2f'))#formatted print statement for topping cost
print ("\tYour subtotal is: \t\t$",format(subtotal, '.2f'))#formatted print statement for subtotal
print ("\tYour tax is: \t\t\t$",format(tax, '.2f'))#formatted print statement for tax
print ("---------------------------------------------------")#print statement to make this look nice
print ("\tThe total for your order is: \t$",format(totalprice, '.2f'))#formatted print statement for totalprice


This post was edited by Drakwen on Jun 20 2015 07:49pm
Member
Posts: 62,215
Joined: Jun 3 2007
Gold: 9,039.20
Jun 21 2015 01:33am
Quote (Drakwen @ Jun 20 2015 07:48pm)
in case anyone was interested in what was written, this is how i did it... i figured 300fg just to make this little program was good lol its like 1page of code... i didnt even ask for it to be commented lol

Code
toppingselection = "" #declaration as a string
pizzatype = "" #declaration as a string
pizzasize = "" #declaration as a string
sizetypecost = 0.0 #declaration as a float
tax = 0.0 #declaration as a float
toppings = 0.0 #declaration as a float
subtotal = 0.0 #declaration as a float
totalprice = 0.0 #declaration as a float
print ("Welcome to the Mackey's Pizza app, this app will calculate the price of your pizza based on what you order") #Welcome message
pizzatype = str(input("Please Enter Pizza Type\n\tR for round\n\tS for square ")) #Input for pizzatype variable
pizzasize = str(input("Please Enter the size of your pizza:\n\tSmall - S\n\tMedium - M\n\tLarge - L\n\tExtra Large - XL: "))#input for pizzasize variable
if pizzatype == "R" and pizzasize == "S":#if statement that decides how much the sizetypecost will be
sizetypecost = 5.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "M":#elif statement that decides how much the sizetypecost will be
sizetypecost = 7.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "L":#elif statement that decides how much the sizetypecost will be
sizetypecost = 9.95 #set sizetypecost
elif pizzatype == "R" and pizzasize == "XL":#elif statement that decides how much the sizetypecost will be
sizetypecost = 11.95 #set sizetypecost
elif pizzatype =="S" and pizzasize == "S":#elif statement that decides how much the sizetypecost will be
sizetypecost = 6.95 #set sizetypecost
elif pizzatype =="S" and pizzasize == "M":#elif statement that decides how much the sizetypecost will be
sizetypecost = 8.95 #set sizetypecost
elif pizzatype == "S" and pizzasize == "L":#elif statement that decides how much the sizetypecost will be
sizetypecost = 10.95 #set sizetypecost
elif pizzatype == "S" and pizzasize == "XL":#elif statement that decides how much the sizetypecost will be
sizetypecost = 12.95 #set sizetypecost

while toppingselection != "E":#toppingselection loop, will end if E is entered
toppingselection = str(input("Please enter what type of toppings you would like\n\tM for meats such as peperoni, sausage, etc...\n\tV for veggies\n\tC for extra cheese\n\tE if you are done selecting toppings."))#input for toppingselection
if toppingselection == "M":#if statement for toppingselection = M
toppings = toppings+1.50 #topping adds 1.50 to total of toppings if selection is M
elif toppingselection == "V":#elif statement for toppingselection = V
toppings = toppings+1.00#topping adds 1.00 to total of toppings if selection is V
elif toppingselection == "C":#elif statement for toppingselection = C
toppings = toppings+1.25#topping adds 1.25 to total of toppings if selection is C
subtotal = toppings+sizetypecost#subtotal formula
tax = (toppings+sizetypecost)*.06#tax formula
totalprice = toppings+sizetypecost+tax#totalprice formula
print ("---------------------------------------------------")#print statement to make this look nice
print ("\tThe pizza you selected costs: \t$",format(sizetypecost, '.2f'))#formatted print statement for sizetypecost
print ("\tThe toppings you ordered cost: \t$",format(toppings, '.2f'))#formatted print statement for topping cost
print ("\tYour subtotal is: \t\t$",format(subtotal, '.2f'))#formatted print statement for subtotal
print ("\tYour tax is: \t\t\t$",format(tax, '.2f'))#formatted print statement for tax
print ("---------------------------------------------------")#print statement to make this look nice
print ("\tThe total for your order is: \t$",format(totalprice, '.2f'))#formatted print statement for totalprice


Maybe you should have someone write it after all so your professor doesn't drop you from the class.
Member
Posts: 16,455
Joined: May 2 2007
Gold: 20.17
Jun 21 2015 07:35am
Quote (j0ltk0la @ Jun 21 2015 02:33am)
Maybe you should have someone write it after all so your professor doesn't drop you from the class.


absolutely, now that i got 100% on the assignment and the code produced exactly the result that she asked for yes now i should have someone write it for me... lol i dont feel like she's gonna drop me anytime soon, i dont have a perfect score in the class but 92% isnt that bad lol
Member
Posts: 6,325
Joined: Dec 2 2007
Gold: 5,347.75
Jun 26 2015 04:53pm
Quote (Drakwen @ 21 Jun 2015 14:35)
absolutely, now that i got 100% on the assignment and the code produced exactly the result that she asked for yes now i should have someone write it for me... lol i dont feel like she's gonna drop me anytime soon, i dont have a perfect score in the class but 92% isnt that bad lol


Well, he was just being cruel.
The code you posted is naive, but everybody starts some place.

just a hint:
Don't comment the obvious. You are making the readers more stupid than they are.
Member
Posts: 16,455
Joined: May 2 2007
Gold: 20.17
Jun 30 2015 06:37am
Quote (Utunity @ Jun 26 2015 05:53pm)
Well, he was just being cruel.
The code you posted is naive, but everybody starts some place.

just a hint:
Don't comment the obvious. You are making the readers more stupid than they are.


i only comment the obvious because the professor makes us, i think its stupid too, but she will mark me down if i dont.
Go Back To Homework Help Topic List
Add Reply New Topic New Poll