Uploaded by Akitamaあき たま

M1 F1 Algorithm AnalysisCoral

advertisement
M1|F1: Algorithm Analysis
Name: Earl Vincent Coral
CS
Problem 1: Calculate the area of one circle
Input
Process
Output
The radius of the circle (r)
The formula for calculating
the area of a circle is A =
πr^2
The output is the area of the
circle, represented by A.
where A represents the area
of the circle and π (pi) is a
constant value of
approximately 3.14159.
To calculate the area of the
circle, we substitute the value
of the radius into the formula:
A = πr^2
Problem 2: Calculate the temperature in Celsius. Temperature in Fahrenheit will be entered. The
formula is;
Temperature in Celsius = 5/9 (temperature in Fahrenheit – 32)
Input
Process
Output
Temperatur in Fahrenheit.
Use the formula Temperature
in Celsius = 5/9 (temperature
in Fahrenheit – 32) to
calculate the temperature in
Celsius.
Temperature in Celsius.
Problem 3: Calculate the final mark for a student who took the CS124 paper. The final mark is the
total of on-going assessment (carry mark) and 70%% of final exam. The carry mark is calculated as
follow:
Carry mark = 20% of test mark + 10% of quiz mark
Input
Process
Output
Test mark, quiz mark, and
final exam mark.
Calculate the carry mark by
multiplying the test mark by
0.2, adding the quiz mark
multiplied by 0.1, and then
add the result to 70% of the
final exam mark.
The final mark for the
student, which is the sum of
the carry mark and 70% of
the final exam mark.
Download