Write an algorithm and draw a flowchart that determine whether a student has passed or failed. Add the student CA,mid semester test and exam score. addition of score should not be more than 100.the pass mark should be 60

Dani AI

Generated

Restatement and context: the task (posted by ) asks for an algorithm/flowchart that accepts three inputs—CA (continuous assessment/coursework), mid‑semester test, and exam—such that their sum is at most 100, and the pass threshold is 60. is correct to start with step‑by‑step thinking; captured the core total/compare idea; gave a minimal conditional. The gaps to close are clear input validation, explicit handling when component totals exceed 100, and a clean flow for errors and reporting.

Algorithm (high level)

  1. Read CA, Mid, Exam (numeric).
  2. If any input < 0 then report "Invalid: negative score".
  3. If (CA + Mid + Exam) > 100 then report "Invalid: total exceeds 100".
  4. Compute Total = CA + Mid + Exam.
  5. If Total >= 60 then report "PASS" and show Total; else report "FAIL" and show Total.

Pseudocode (concise, different from earlier post)

INPUT CA, MID, EXAM
IF CA < 0 OR MID < 0 OR EXAM < 0 THEN
  PRINT "ERROR: scores must be >= 0"
ELSE IF CA + MID + EXAM > 100 THEN
  PRINT "ERROR: total exceeds 100"
ELSE
  TOTAL = CA + MID + EXAM
  IF TOTAL >= 60 THEN
    PRINT "PASS - Total =", TOTAL
  ELSE
    PRINT "FAIL - Total =", TOTAL
  ENDIF
ENDIF

Flowchart and practical notes: draw Start -> Input box (CA,MID,EXAM) -> Decision diamond for negative values -> Decision for total>100 -> Compute total -> Decision total>=60 -> Output PASS/FAIL -> End. If component scores come from different maxima or need weights, first convert each to its percentage or apply the specified weight so the combined scaled sum is out of 100. Include edge tests when implementing (e.g., totals exactly 60, totals slightly over 100 to verify error handling). This complements and improves by adding validation and clearer user feedback.

Recommended Answers

All 4 Replies

Hi,

Thanks for submitting your topic. Sorry for it being so difficult to figure out how to do. I'm currently working on trying my best to improve usability here at DaniWeb.

However, per our private chat, please post your question along with what you've tried so far and where you're stuck, and I'll do my best to help you within the next hour or so.

What have you tried so far? What, specifically, do you need help with for this homework assignment?

A good place to start is to write down step by step instructions on how you would do this by hand.

This question seems to be asking how a simple spreadsheet based gradebook program functions. Values can be weighted variously, but the essential algorithm is nothing more than: if CW+MT+Exam/total possible points>60% print "P" I am not sure of the grammar here any more--and I imagine that depends on the language you are using--but I think this is the gist of the idea. To me the formula is both algorithm and flowchart, but I guess you could box each part up in arrow boxes and say, "walk this way." That help?

The simples way to go about this is to check test score agaist the passmark .

Passmark = 60

Score = 0-100

Spudacode/Algorithem:

Input Greade 
if (GRADE < 60) then
Print “FAIL”
else
Print “PASS”
endif                    

The Flowchart version of solution for this is

Should_You_Work_at_Home.png

Image Credits (Creately Flowchart Software)

If you want to check more slabs, eg: 60 - Just pass 75> Good 80> Great, you may have to have different dicisions and out comes

commented: Spudacode: Grown in Idaho. +0
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.