The textbook demonstrates a program that can calculate the individual average. Do you need me to write out that from the book?
ok. I will provide the answer ASAP
Download answer from here:
http://wikisend.com/download/542070/Alberta is a teacher at a university.docxYou can ask me again using "For LogicPro only" at the start of your questions like other customers to get instant answers.It will ensure that question is for me.Please bookmark my profile page:http://www.justanswer.com/homework/expert-logicpro/so you can come back and ask me a question anytime.Remember, if for any reason you are unsatisfied with my answer, we can continue the conversation until you’re satisfied and rate my answer as excellent. I can address follow up questions on original requirements at no extra charge and I’m always here to help. Thank you for using JustAnswer!
Thank you for response to the problem, however the syntax you used is not quite the same as what we use in class. Here is the program written to give an individual average. This needs to be expanded to also give a class average:
Declare Count As Integer
Declare Name As String
Declare Score As Float
Declare ExamTotal As Float
Declare ExamAverage As Float
Set ExamTotal = 0.0
Set ExamAverage = 0.0
Write "Enter a student's name or enter * to quit: "
While Name != "*"
For (Count = 1; Count < 4; Count++)
Write "Enter exam score number " + Count
Set ExamTotal = ExamTotal + Score
Set ExamAverage = ExamTotal / 3
Write "Student: " + Name
Write "Exam average: " + ExamAverage
Write "Enter another student's name or enter * to quit: "
Set ExamTotal = 0.0
This is the feedback I received from the professor:
Todd - please see critiques below: -Good work overall -You need to tell the user what the program is going to do and what they are expected to enter -Count gets reset everytime the For loop runs ... you should rename count to eliminate any confusion -ClassTotal needs to be divided by the number of tests, not students
This is the code(I fixed the description part):
Main ModuleDeclare Count As IntegerDeclare Name As StringDeclare Score As FloatDeclare ExamTotal As FloatDeclare ExamAverage As FloatDeclare ClassTotal As FloatDeclare ClassAverage As FloatDeclare count As IntegerSet ExamTotal = 0.0Set ExamAverage = 0.0Set ClassTotal = 0.0Set ClassAverage = 0.0Set count = 0Write "This Program calculates the Average of the"Write "Test Scores and the Class Average"Write "Enter a student's name or enter * to quit: "Input NameWhile Name != "*" For (Count = 1; Count < 4; Count++) Write "Enter exam score number " + Count Input Score Set ExamTotal = ExamTotal + Score End For Set ExamAverage = ExamTotal / 3 Write "Student: " + Name Write "Exam average: " + ExamAverage Set ClassTotal = ClassTotal + ExamTotal count++ Write "Enter another student's name or enter * to quit: " Input Name Set ExamTotal = 0.0End WhileWrite “Class Total: “ + ClassTotalSet ClassAverage = ClassTotal / countWrite “Class Average: “ + ClassAverageEnd Program
Can you fix the issues with the code?
Have you had a chance to make the corrections yet?