0% found this document useful (0 votes)
2 views1 page

Assignment - Programming

The document outlines an assignment that involves declaring variables and constants in pseudocode, creating an algorithm to validate the dimensions of a right-angled triangle, and extending the algorithm to calculate the hypotenuse, area, and perimeter. It also requires providing a menu for calculation options and testing the program in Python. The assignment is divided into multiple parts, each focusing on specific programming concepts and calculations.

Uploaded by

hassansalako32
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Assignment - Programming

The document outlines an assignment that involves declaring variables and constants in pseudocode, creating an algorithm to validate the dimensions of a right-angled triangle, and extending the algorithm to calculate the hypotenuse, area, and perimeter. It also requires providing a menu for calculation options and testing the program in Python. The assignment is divided into multiple parts, each focusing on specific programming concepts and calculations.

Uploaded by

hassansalako32
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ASSIGNMENT

1) Use pseudocode to declare these variables and constants.

You will need to decide which identifiers are variables and which are constants. [6]

2) Write a pseudocode algorithm to input the height and width of a right-angled triangle and check
that these values are positive and less than the maximum values given in Question 1. [4]

3 a) For this question, you will need to use this function, which returns the real value of the square
root of HypotenusSQR:

SquareRoot(HypotenusSQR : REAL) RETURNS REAL

3b) Extend your algorithm for Question 2 to:

i) calculate the hypotenuse [2]

ii) calculate the area [2]

iii)calculate the perimeter. [2]

b) Provide a menu to choose which calculation to perform. [3]

c) Check that all the above work by writing and testing a program in Python programming language.

You might also like