Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

‫جامعة تبوك‬

‫عمادة التعلم اإللكتروني والتعليم عن بعد‬

Week 4 Assignment
Solution Planning
1- An instructor calculates the grade percentage based on
the highest score on a test. Given the highest score and
one student’s score, write a solution (in terms of
Interactivity Charts, IPO Charts and algorithms) to
calculate and print
Percentage = Score/Highest Score * 100
Input Processing Output
SCORE  Enter score  Grade percentage
HIGH SCORE  Enter high score
 Calculate
percentage
 Print the grade
precentage
Algorithm:
• Input:
– SCORE
– HIGH SCORE
• Output:
– Grade percentage
• Steps:
– take the score
– take the high score
– calculate the Percentage = Score/Highest Score * 100
– print Grade percentage
– End
‫جامعة تبوك‬

‫عمادة التعلم اإللكتروني والتعليم عن بعد‬

2- Ahmed needs to change a Fahrenheit temperature to


Celsius. In terms of Interactivity Charts, IPO Charts and
algorithms, write a solution to convert from Fahrenheit to
Celsius. Test your solution with temperature of 80
degree.
Hint: to convert from Fahrenheit to Celsius, use the
following formula:
Celsius = 5/9 (Fahrenheit – 32)
•Input
– Fahrenheit
•Output:
– Celsius
•Steps:
–take the Fahrenheit degree
–convert Fahrenheit to Celsius (Celsius = 5/9 (Fahrenheit – 32)
–Show result of conver
–End

2- Test algorithm
Input:
– Fahrenheit
•Output:
– Celsius
•Steps:
–take the Fahrenheit 80
–apply convert =5/9(80-32)
–Show Celsius 26.6
–End

You might also like