Question

In: Computer Science

// This pseudocode is intended to determine whether students have // passed or failed a course;...

// This pseudocode is intended to determine whether students have

// passed or failed a course; student needs to average 60 or

// more on two tests.

start

Declarations

num firstTest

num secondTest

num average

num PASSING = 60

output "Enter first score or 0 to quit "

input firstTest

while firstTest not equal to 0

output "Enter second score or 0 to quit"

input secondTest

average = (firstTest + secondTest) / 2

output "Average is ", average misspelled “t” for the word output

if average >= PASSING then

output "Pass"

else

output "Fail"

endif

endwhile

stop

Solutions

Expert Solution

// This pseudocode is intended to determine whether students have
// passed or failed a course; student needs to average 60 or
// more on two tests.

start
Declarations
   num firstTest
   num secondTest
   num average
   num PASSING = 60
  
   // input of first test score
   output "Enter first score or 0 to quit "
   input firstTest
  
   // loop that continues until the user enters 0 as first test score
   while firstTest not equal to 0
      
       // input of second test score
       output "Enter second score or 0 to quit"
       input secondTest
      
       // if second test score is not 0 then calculate and display average and display if the student passed or failed
       if secondTest is not equal to 0
          
           // calculate and display average
           average = (firstTest + secondTest) / 2
           output "Average is ", average misspelled "t" for the word output
          
           // determine if the student passed or failed
           if average >= PASSING then
               output "Pass"
           else
               output "Fail"
           end if
          
           // input of firstTest score
           output "Enter first score or 0 to quit "
           input firstTest  
          
       else // if secondTest is 0, set firstTest to 0 to end the program
           firstTest = 0
       end if  
      
   end while
stop  


Related Solutions

Q1 In a class on 50 students, 35 students passed in all subjects, 5 failed in...
Q1 In a class on 50 students, 35 students passed in all subjects, 5 failed in one subject, 4 failed in two subjects and 6 failed in three subjects. Construct a probability distribution table for number of subjects a student from the given class has failed in. Calculate the Standard Deviation. Q2 45 % of the employees in a company take public transportation daily to go to work. For a random sample of 7 employees, what is the probability that...
10. If 12.1 percent of her students failed the course and received F's, what is the...
10. If 12.1 percent of her students failed the course and received F's, what is the maximum score among those who received an F? a. 63.1 b. 64.3 c. 65.4 d. 66.3 11. A subset of a population selected to represent the population is a. a subset b. a small population c. a sample d. a parameter 12. The phenomenon that the sampling distribution of the sample mean can be approximated by a normal distribution as the sample size become...
in a certain college, 25% of the students failed mathematics,15% of the students failed chemistry and...
in a certain college, 25% of the students failed mathematics,15% of the students failed chemistry and 10% of the students failed both mathematics and chemistry. A student is selected at random, I)if he failed the exam, what is the probability that he failed mathematics? ii) if he failed mathematics, what is the probability that he failed chemistry? iii) what is the probability that he failed mathematics or chemistry?
A researcher wants to determine whether high school students who attend an SAT preparation course score...
A researcher wants to determine whether high school students who attend an SAT preparation course score significantly different on the SAT than students who do not attend the preparation course. For those who do not attend the course, the population mean is 1050 (μ = 1050). The 16 students who attend the preparation course average 1150 on the SAT, with a sample standard deviationof 300. On the basis of these data, can the researcher conclude that the preparation course has...
A researcher wants to determine whether high school students who attend an SAT preparation course score...
A researcher wants to determine whether high school students who attend an SAT preparation course score significantly different on the SAT than students who do not attend the preparation course. For those who do not attend the course, the population mean is 1050 (μ = 1050). The 16 students who attend the preparation course average 1150 on the SAT, with a sample standard deviationof 300. On the basis of these data, can the researcher conclude that the preparation course has...
A researcher wants to determine whether high school students who attend an SAT preparation course score...
A researcher wants to determine whether high school students who attend an SAT preparation course score significantly different on the SAT than students who do not attend the preparation course. For those who do not attend the course, the population mean is 1050 (μ = 1050). The 16 students who attend the preparation course average 1150 on the SAT, with a sample standard deviation of 300. On the basis of these data, can the researcher conclude that the preparation course...
I have collected about 200 samples worth of data to determine whether students that are not...
I have collected about 200 samples worth of data to determine whether students that are not full time, full time being defined as anyone with 12 or more units, have a higher GPA than students who are full time. For this case our variances are not equal to each other and our samples are independent of each other. How would you set up the hypothesis test for this case? I originally have it set up like this but not sure...
In order to determine whether or not a driver's education course improves the scores on a driving exam, a sample of 6 students were given the exam before and after taking the course.
Answer in Excel way. 1.                   In order to determine whether or not a driver's education course improves the scores on a driving exam, a sample of 6 students were given the exam before and after taking the course. The results are shown below. Let d = Score After - Score Before. Student Score Before the Course Score After the Course 1 83 87 2 89 88 3 93 91 4 77 77 5 86 93 6 79 83 a.            State...
in a class of 25 students, 17 passed calculus, 13 passed chemistry, and 8 passed physics....
in a class of 25 students, 17 passed calculus, 13 passed chemistry, and 8 passed physics. No one passed all three, but at least six of them failed all three subjects. How many students failed all three subjects?
The University is trying to decide whether to implement a mandatory remedial math course for students...
The University is trying to decide whether to implement a mandatory remedial math course for students with low test scores upon admissions. Historically, students with low admissions test scores have failed their first math course 61% of the time. A random sample of students with low scores is selected and assigned to a remedial math course. These students are tracked and it is found that 102 out of 175 of them still fail their first regular math course.             If...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT