![]() 06/30/2018 at 07:00 • Filed to: None | ![]() | ![]() |
UPDATE:
Am I doing it incorrectly so far?
![]() 06/30/2018 at 03:22 |
|
Context: I was instructed to create a flowchart to determine the rate of a student’s 5 quizzes in 5 subjects, displaying the rate in certain words. I have an idea as to how it would go, but I find the actual flowcharting a bit sketchy.
![]() 06/30/2018 at 03:32 |
|
Shouldn’t there be a part related to beer consumption in this flow chart?
![]() 06/30/2018 at 07:25 |
|
no idea.
![]() 06/30/2018 at 08:24 |
|
There are several problems if you are looking at it from a programming perspective. Each of your declarative statements should have a single equality (i.e. AV=(q1+q2+q3+q4+q5)/5 ). Using SUM and AVERAGE are redundant.
I would switch the if/then statements around:
If score >=
90
, then print “A”
If score >=80, then print “B”
etc.
By slicing from the top score down, you don’t have to put the scores into ranges. Once the score meets the correct criteria, the program will move through that branch of the decision tree,
![]() 06/30/2018 at 08:47 |
|
the program will move through that branch of the decision tree,
What else ? Any more? Or that’s it? /joke
Either way, thank you. So I’m taking two rectangles away here to use just one rectangle?
![]() 06/30/2018 at 08:48 |
|
Bingo...just like writing an Excel formula or SQL logic. We call it “waterfalling” at my job — since failing is the largest bucket, it should come last and catch everything not pulled out beforehand. And <= will eliminate the logical overlap at the score cusps.
![]() 06/30/2018 at 09:06 |
|
What does that look like, though, at least for my case?
![]() 06/30/2018 at 09:13 |
|
I’ve never written a flowchart, but basically just reverse the order of all the scores, then add <= to some of the < or > to make sure they fall into one box or another. Right now, a 90 would create an error because it’s not included.
Hope that makes sense.
![]() 06/30/2018 at 09:19 |
|
Yeah, there’s no need for two. I was more concerned about things like “sum=Aq1+Aq2+Aq3+Aq4+Aq5=x”. That won’t work. Keep it simple. If you want to do it in two steps, then do this:
x=Aq1+Aq2+Aq3+Aq4+Aq5
AV = X/5
![]() 06/30/2018 at 09:35 |
|
Thank you, now I got the topside done. It’s my decision area that needs work next. To Ash78's thread!
![]() 06/30/2018 at 09:40 |
|
Then I just continue from here?
![]() 06/30/2018 at 09:55 |
|
Think about this logically. “if av<=100" means if the value of av is less than or equal to 100, print Excellent. That will capture ALL of the average scores because every score is less than or equal to 100.
What you really want is to capture anything greater than or equal to 90. That would be written “if av>=90".
Any score less than 90 would trigger the “No” branch and move down the tree. Any score greater than or equal to 90 would trigger the “Yes” branch and print “Excellent”.
![]() 06/30/2018 at 09:59 |
|
Ah, now I get it. *slaps self* Thank you again.
![]() 06/30/2018 at 10:17 |
|
Yep, he beat me to it — ditto. The first logical cutoff is 90.