cs/Practical File/questions/question_03_output.txt
Neil Revin 780baf678e
chore: move question & output files
Move python question files to 'questions' directory
Move output files to 'outputs' directory
Copy output files to 'questions' for ease of viewing

Signed-off-by: Neil <neil@willofsteel.me>
2025-06-24 02:34:07 +05:30

16 lines
330 B
Plaintext

Question 03:
Write a Python program to accept the length and width of a rectangle and compute its perimeter and area.
Answer:
def main(length: int, width: int) -> None:
print("Perimeter:", 2 * (length + width))
print("Area:", length * width)
if __name__ == '__main__':
main(10, 10)
Output:
Perimeter: 40
Area: 100