How Do I Complete Pseudocode for Classroom Score Calculations?

Click For Summary

Discussion Overview

The discussion revolves around completing pseudocode for a classroom score calculation program as part of a basic programming class. Participants are focused on developing pseudocode and flowcharts to handle student data input, including student ID, classroom number, and achievement test scores, and calculating total points and averages for classrooms.

Discussion Character

  • Homework-related
  • Technical explanation
  • Debate/contested

Main Points Raised

  • The original poster (OP) shares their pseudocode and expresses confusion about completing it, particularly in transitioning from data input to processing classroom scores.
  • One participant suggests that the OP has completed the first step of data collation and advises removing a line of code that increments the classroom number during this step.
  • Another participant mentions that their instructor included the line in question, indicating a potential disagreement about the structure of the pseudocode.
  • There are repeated requests for help with the flowchart and pseudocode for part 5b, emphasizing the OP's ongoing struggle with the assignment.
  • Some participants provide suggestions for posting flowcharts, such as exporting to different file formats.
  • A couple of posts question the relevance of BASIC programming to physics, indicating a broader discussion about the intersection of programming and scientific fields.

Areas of Agreement / Disagreement

Participants express differing views on the correct structure of the pseudocode, particularly regarding the placement of certain lines. There is no consensus on the final form of the pseudocode or flowchart, and the OP continues to seek clarification and assistance.

Contextual Notes

There are unresolved aspects regarding the flowchart and pseudocode, particularly in the transition between data input and output steps. The discussion reflects varying interpretations of the assignment requirements.

Who May Find This Useful

Students in programming courses, particularly those focusing on pseudocode and flowchart design, as well as those interested in the application of programming in educational settings.

ksweeper21
Messages
3
Reaction score
0
I am taking a very basic programming class, and all we work with is fliowcharts and pseudocode. We use the following book: Programming Logic and Design, 5th edition, comprehensive by Joyce Farrell. We use VISIO for the flowcharts, and Word for the pseudocode. And I need help with the following question:

5a. Watson Elementary School contains 30 classrooms numbered 1 through 30. Each classroom can contain any number of students up to 35. Each student takes an achievement test at the end of the school year and receives a score from 0 through 100. Write a program that accepts data for each student in the school---student ID, classroom number, and score on the acievement test.

Design a program that lists the total points scored for each of the 30 classrooms.

I have completed the flowchart for this part, but I got confused when trying to finish the pseudocode. Here is my pseudocode for part 5a.

It won't let me upload the files here, so I will post my pseudocode for part 5a (what I have of it) and if you need to see the flowchart, email me at the email address below, or tell me how to attach it!

Start
num stuID
num classNum
num score
num SIZE = 30
num totalPnts[SIZE] = 0
get stuID, classNum, score
while not eof
if classNum >= 1 AND classNum <= SIZE then
totalPnts[classNum – 1] = totalPnts[classNum – 1] + score
else
print “invalid classroom number”
endif
get stuID, classNum, score (GOT LOST RIGHT HERE)



classNum = classNum + 1
endwhile
Stop

The gap between get stuID, classNum, score and classNum = classNum + 1 is where the rest of the pseudocode goes, but I got lost.

5b. Modify Exercise 5a to that each classroom's average of the test scores prints, rather than each classroom's total.

I need both flowchart and pseudocode for this part.

Any help will be greatly appreciated. Please email me at ksweeper21@gmail.com. Thank you.
 
Physics news on Phys.org
Your program will have TWO steps. Step one will collate all the data by iterating through the student data.

ONCE THAT IS DONE, step 2 will iterate through the classroom array and print them out.

You have completed step 1 - there is no missing code. But there is one change required: drop the classNum = classNum + 1. You will not iterate through the classes in the first step, only in the second.
 
When my instructor went over the problem, that part of the pseudocode was included, and other people in the class said I was missing the end of the pseudocode.

I would like to post my flowchart for part 5a, but the file type is not allowed. Any suggestions?
 
ksweeper21 said:
When my instructor went over the problem, that part of the pseudocode was included
Well, there are many ways of solving a given problem. I don't know what his way is. It is true, your program will end with that line, but it is currently in the wrong place.

ksweeper21 said:
and other people in the class said I was missing the end of the pseudocode.
Correct. You still have step 2 to do.

ksweeper21 said:
I would like to post my flowchart for part 5a, but the file type is not allowed. Any suggestions?
Your flowcharting program will probably have an option to export to GIF or BMP.
 
Last edited:
Alright, Here is my flowchart for part 5a. and the pseudocode for part 5a again, just in case.


I really need help with at least the flowchart or pseudocode for part 5b.


Thank you very much.
 

Attachments

ksweeper21 said:
Alright, Here is my flowchart for part 5a. and the pseudocode for part 5a again, just in case.


I really need help with at least the flowchart or pseudocode for part 5b.


Thank you very much.

Attachments are still pending approval.

Have you studied my suggestions and made any progress?
 
ksweeper21 said:
Alright, Here is my flowchart for part 5a. and the pseudocode for part 5a again, just in case.


I really need help with at least the flowchart or pseudocode for part 5b.


Thank you very much.

Please avoid posting in DOC format -- there are issues with macros and such. PDF format is preferred. Thanks.
 
ksweeper21 said:
Alright, Here is my flowchart for part 5a. and the pseudocode for part 5a again, just in case.


I really need help with at least the flowchart or pseudocode for part 5b.


Thank you very much.
OK. The flowchart is incomplete.

As I said previously:
1] So far you've only done step 1 - data collation. You haven't done step 2 - output.
2] The classnum = classnum + 1 is out of place. It has no place in step 1 but will be needed in step 2.
 
Hold on.
Is there any relevance of BASIC programming to physics.
 
  • #10
jollyPHYSICS said:
Hold on.
Is there any relevance of BASIC programming to physics.

This thread is over a year old and the OP hasn't been back here since then.

Programming can be very relevant to physics, just as with most other fields such as engineering. Not sure about basic though.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 1 ·
Replies
1
Views
7K
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 5 ·
Replies
5
Views
4K