Official Business
CSS12L: Computer Programming Laboratory
Machine Problem #2: Variables, Input and Output
Name: Score
:
Sectio Date:
n:
Instructions:
1. Save your file as Surname_Firstname_MP2. Ex. Santos_Jared_MP2
2. You will submit the following and send it to BB.
a. PDF file of Machine Problem 2 provided with the screenshot of your answers.
b. Python Notebook File
3. Your program must have comments for each section.
Header Comments:
This demo program shows how good a Python program is
Written by: Cheryl Mari M. Isip
Date: January 07, 2025
Time: 12:30pm
Program: BSIE
Course: CSS12L
Section: A9
School: Mapua University
4. Your output should be displayed rounded to two decimal places.
5. You’re not allowed to use conditional or repetition statements.
Rubrics
1. Correct output 50
2. Comments 10
3. Design and user interface 20
4. Complete submission of files 10
(Zip files) 10
5. Readability
Official Business
CSS12L: Computer Programming Laboratory
Machine Problem #2: Variables, Input and Output
MACHINE PROBLEM
The perimeter, approximate surface area, the approximate volume of an in ground pool are
given by the following formula:
Perimeter = 2(length + width)
Volume = length * width * average depth
Underground surface area = 2(length + width) average depth + length * width
Using this formula as a basis, write a MATLAB program that accepts the length, width and
average depth measurements, and then calculates the perimeter, volume, and underground
surface area of the pool. In writing you program, make the following two calculations
immediately after the input data has been entered: length * width and length + width. The
results of these two calculations should then be used, as appropriate, I n the assignments
statements for determining the perimeter, volume, and underground surface area without
recalculating them for each equation. Verify the results of your program by doing a hand
calculation using the following test data: length equals 25 feet, width equals 15 feet, and
average depth equals 5.5 feet. When you have verified that your program is working, use it
to complete the following table:
Length Width Depth Perimeter Volume Undergroun
d
Surface
Area
25 10 5.0
25 10 5.5
30 12 5.5
30 12 5.0
30 12 6.5
Official Business
CSS12L: Computer Programming Laboratory
Machine Problem #2: Variables, Input and Output
In the editor window, take a screenshot and paste your output:
Official Business
CSS12L: Computer Programming Laboratory
Machine Problem #2: Variables, Input and Output
In the command window, take a screenshot and paste your output:
Official Business
CSS12L: Computer Programming Laboratory
Machine Problem #2: Variables, Input and Output