Advertisement
fiberoptnic

Untitled

Oct 18th, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #### Program 2: Lemonade Stand Profit ####
  2.  
  3. # function to calculate profit
  4. def calcProfit(cost,price,count)
  5. profit = int((count*price) - (count*cost))
  6.  
  7. # function for lemonade sales
  8. def lemonade()
  9. lemonCost = int(input('Please enter the cost to make a cup of lemonade: '))
  10. lemonPrice = int(input('Please enter the price a cup of lemonade sells for: '))
  11. lemonCount = int(input('Please enter the number of cups sold: '))
  12. lemonProfit = calcProfit(lemonCost,lemonPrice,lemonCount)
  13. print('Total profit for lemonade sales is: ',lemonProfit)
  14.  
  15. lemonade()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement