Exercise Questions
Last updated
Last updated
Notes:
- The total cost will be inputted as a real number
- the tip percentage will be inputted as a whole number.You should have 4 inputs.
- x1
- y1
- x2
- y2Instructions:
- There are 3 inputs. One for each section of the fence.
- Each fence plank denoted by a "F" requires a single paint can
- The paint can only comes in a box of 12.
- A single box cost $14.95
Sample Input 1:
FF
FFFF
FFFFFF
Sample Output 1:
12.0
0.0
14.95
Explanation:
- From the three sections inputted, the project requires 12 paint cans
(one for each fence plank)
- There were 0 leftovers since a single box contains 12 paint cans
- The cost was 14.95 since a single box sells for 14.95
Sample Input 2:
FFFFF
FFFF
FFFFF
Sample Output 1:
14.0
10.0
29.9
Explanation:
- There were 14 paint cans needed in total
- To paint 14 planks, 2 boxes were purchased
- There were 10 paint cans leftover from having 24 cans.
- Two boxes cost $29.9