With the cost of living, even Santa is feeling the pinch. He is sick of his elves wasting wrapping paper. He wants to know exactly how much wrapping paper to use.
There will be an element of maths needed to work out this problem. You will need to make sure that you know how to user operators such as * / - + to work out the answer.
Program requirements: -
*Ask the user for the length
*Ask the user for the width
*Ask the user for the height
*Ask the user how much the wrapping paper costs per square meter (approx. 50p / 0.5)
*Work out how much the parcel would cost to wrap
*Output the price to Santa
See the guidance :
Casting
When you're using computer programming, you're going to need to ask the elves for the dimensions of each of the sides. We can do this by asking them in CM.
You might do this by trying the following example: -
length = input("What is the length of your parcel?")
The problem is that you cannot multiple strings / text. Python will need to convert it back to a whole number (integer) or a decimal (float). To do this is quite simple.
length = int(length)
length = float(length)
Maths
Once you've worked out how to convert the input into a float or integer, you can multiply it.
total = length * chosenvariable
Output
You can use print to output the answer.
print(total)