I would like to solve this problem using the find function. I have been working on it using the split function because I don't understand find. If someone could show me how to do it with find, it would be awesome. Also I am getting stuck in this one part of the problem.
start = ("Please enter the starting weight of food (in lbs:ozs) = ")
answerOne = input(start).strip()
startPounds, startOunces = answerOne.split(":")
startPounds = int(startPounds)
startOunces = int(startOunces)
end = "Please enter the ending weight of food (in lbs:ozs) = "
answerTwo = input(end).strip()
endPounds, endOunces = answerTwo.split(":")
endPounds = int(endPounds)
endOunces = int(endOunces)
startPoundsO = startPounds * 16
endPoundsO = endPounds * 16
poundsO = startPoundsO - endPoundsO
This is where I am having problems.
Heres the original problem.
A monkey is being fed some food. Read in the starting weight in lbs:ozs. Also read in the ending weight in lbs:ozs (you may assume this is smaller than the starting weight. Find the difference and print out the amount of food consumed by the monkey in lbs:ozs.
Heres the data provided.
Starting weight of food (in lbs:ozs)=8:9
Ending weight of food (in lbs:ozs)=6:14
Food consumed by the monkey (lbs:ozs)=1:11