Duplicate Question
The question on this page has been marked as a duplicate question.
Original Question
1. Create a pseudocode algorithm that will accept the name of the motorists and the type of offence for the ticket. Determine i...Asked by azikeecampbell
                1.	Create a pseudocode algorithm that will accept the name of the motorists and the type of offence for the ticket. Determine if the tickets will be awarded a demerit point and check the current point(s) each motorist has on his or her licence. Display the updated points for the motorist. If the motorist has over 19 points, his or her licence will be suspended for 2 years.  Other suspensions are based on 10 – 13 points for 6 months suspension and 14 – 19 points for 1 year suspension. Store the list of all suspended motorists. Display the names of the suspended motorists and the penalties.
            
            
        Answers
                    Answered by
            oobleck
            
    Loop {
read name, offence
points = getPoints(name)
demerit = getDemerit(offence)
points++ if (demerit)
if (not demerit) then display("Your lucky day -- no demerit point this time.")
else
if (points > 19) then {display("Get a bike, loser! You now have",points," points."); penalty = "2-year")
else if (points >= 14) then {display("1-year suspension! You now have ",points," points."); penalty = "1-year"}
else if (points >= 10) then {display("6-month suspension! You now have ",points," points."); penalty = "six months"}
else display("Your point total is now ",points)
if points >= 10 then storeSuspended(name,penalty)
}
for each suspendedDriver display(name,penalty)
    
read name, offence
points = getPoints(name)
demerit = getDemerit(offence)
points++ if (demerit)
if (not demerit) then display("Your lucky day -- no demerit point this time.")
else
if (points > 19) then {display("Get a bike, loser! You now have",points," points."); penalty = "2-year")
else if (points >= 14) then {display("1-year suspension! You now have ",points," points."); penalty = "1-year"}
else if (points >= 10) then {display("6-month suspension! You now have ",points," points."); penalty = "six months"}
else display("Your point total is now ",points)
if points >= 10 then storeSuspended(name,penalty)
}
for each suspendedDriver display(name,penalty)
                                                    There are no AI answers yet. The ability to request AI answers is coming soon!
                                            
                Submit Your Answer
We prioritize human answers over AI answers.
If you are human, and you can answer this question, please submit your answer.