Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #### Program 2: Lemonade Stand Profit ####
- # function to calculate profit
- def calcProfit(cost,price,count)
- profit = int((count*price) - (count*cost))
- # function for lemonade sales
- def lemonade()
- lemonCost = int(input('Please enter the cost to make a cup of lemonade: '))
- lemonPrice = int(input('Please enter the price a cup of lemonade sells for: '))
- lemonCount = int(input('Please enter the number of cups sold: '))
- lemonProfit = calcProfit(lemonCost,lemonPrice,lemonCount)
- print('Total profit for lemonade sales is: ',lemonProfit)
- lemonade()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement