0

Hello, I am having trouble writing the pseudocode for the following question. Any advice as to what I may be missing or doing wrong would be greatly appreciated.

Question:
Plan the logic for a program that contains two modules. The first module prompts the user for a grade on an exam. Pass the grade to a second module that prints "Pass" if the grade is 60 percent or higher and "Fail" if it is not.

My pseudocode:

start
num grade
print “Enter exam percentage:”
get grade
gradePercent (grade)
print grade
stop

num gradePercent(grade)
if gradePercent < 60 then
print “Fail”
else
print”Pass”
return gradePercent

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by 2fac323
0

You can get rid of this: print grade
and change your module to this:

gradePercent(grade){
if gradePercent < 60 then
print “Fail”
else
print”Pass”
}

If you do those two things, you will have fulfilled your requirements. So what's the problem?

Edited by BestJewSinceJC: n/a

0

Well first I found out that I need two modules. And between start and stop there should only be one statement- and it should be a call to a module. So I have one module correct I guess i need to determine the other. Also, in the statement: num gradePercent(grade) I was told I was missing a required word in front of grade.

You can get rid of this: print grade
and change your module to this:

gradePercent(grade){
if gradePercent < 60 then
print “Fail”
else
print”Pass”
}

If you do those two things, you will have fulfilled your requirements. So what's the problem?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.