0% found this document useful (0 votes)
26 views14 pages

Problem Solving Jason Sba

Uploaded by

John Brown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views14 pages

Problem Solving Jason Sba

Uploaded by

John Brown
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

PROBLEM-SOLVING AND PROGRAM

IMPLEMENTATION

Candidate Name: Jason Clarke


Teacher Name: Ms.Sheryl Robinson
Date: January 19, 2024
Candidate Number:
Examination Year: May/June 24,2024
Territory: Jamaica
TABLE OF CONTENT
 Problem Definition
 List of Variables and Date Types
 List of Constants
 IPO Chart
 Pseudocode Algorithm
 Test Data
 Trace Table
 Phyton Program
 Screenshots of Working Program
 References

Problem Definition
Develop a pseudocode algorithm or draw a flowchart that accepts as input three-unit test
scores, a project score and exam score for an unspecified number of students. The students’
overall score comprised of their weighted coursework score which is the average of all non-exam
components (including the project score), and the weighted exam score. The weight for the
coursework score is 30% while the exam is 70%. Calculate the students’ average coursework
score, their weighted coursework score, weighted exam score and the overall score. Based on the
overall score of the student, the pseudocode algorithm should generate a letter grade. The
students’ letter grade should range from A to E as outlined in the table located in Task A of the
spreadsheet. The pseudocode algorithm should output the student’s name, weighted coursework
score, weighted exam score, overall score, and the corresponding letter grade.
2. Design and execute a trace table that accepts three-unit test scores, a project score and exam
score for five (5) students from your spreadsheet. The table should trace the calculations of the
coursework scores, weighted coursework scores, weighted exam scores and the overall scores of
the students. The letter grade received for each overall score should also be reflected in the table.

3. Program implementation: using the programming language Python write program code to
implement the algorithm in question one (1) above.

List of Variables and Date Types


Variable Name Data Type Variable
Description
TestPaper_Score1 Integer Holds the first test paper
score
TestPaper_Score2 Integer Holds the second test
paper Scores
TestPaper_Score3 Integer Holds the third test
paper scores
ClassProject_Score Integer Holds project score

Exam_Score Integer Holds exam score

Students_Name String Holds student’s name

WeightedCourseWork_Scor Real Holds weighted


e coursework score

WeightedExam_Score Real Holds weighted exam


scores
Letter_Grade Character Holds the letter grade
Person_Reply String Holds the person’s reply
Overall_Score Real Holds overall score
AverageCoursework_Score Real Holds average
coursework score
List of Constants
 CourseWork_Percentage = 0.3
 Exam_Percentage = 0.7
IPO Chart
Input Processing Output
Students_Name CourseWork_Percentage =0.3 WeightedCourse
TestPaper_Score1 Work_Score
TestPaper_Score2 Exam_Percentage = 0.7 WeightedExam_S
TestPaper_Score3 Print “Do you want to do a core
ClassProject_Score transaction? Type Y or N” Letter_Grade
Exam_Score Read Person_Reply Overall_Score
While Person_Reply <> “N”
Print “Enter Students_Name”
Read Students_Name
Print “Please Enter First Unit Test”
Read TestPaper_Score1
Print “Please Enter Second Unit
Test”
Read TestPaper_Score2
Print “Please Enter Third Unit Test”
Read TestPaper_Score3
Print “Please Enter Project Score”
Read ClassProject_Score
Print “Please Enter Exam Score”
Read Exam_Score
AverageCoursework_Score (
TestPaper_Score1 +
TestPaper_Score2 +
TestPaper_Score3 +
ClassProject_Score )/4
WeightedCourseWork_Score (
AverageCoursework_Score *
CourseWork_Percentage )
WeightedExam_Score (
Exam_Score * Exam_Percentage )
Overall_Score (
WeightedExam_Score +
WeightedCourseWork_Score )
IF Overall_Score >= 90 then
Letter_Grade  “A”
Else IF Overall_Score >= 80 and
Overall_Score <= 89 then
Letter_Grade  “B”
Else IF Overall_Score <= 70 and
Overall_Score <= 79 then
Letter_Grade  “C”
Else IF Overall_Score >= 60 and
Overall_Score 69 then
Letter_Grade  “D”
Pseudocode Algorithm
 Algorithm UBHScore_Calculator
CONSTANTS
 CourseWork_Percentage = 0.3
 Exam_Percentage = 0.7
Declaration of Variables:
TestPaper_Score1 as Integer
TestPaper_Score2 as Integer
TestPaper_Score3 as Integer
ClassProject_Score as Integer
Exam_Score as Integer
Students_Name as String
WeightedCourseWork_Score as Real
WeightedExam_Score as Real
Letter_Grade as Character
Person_Reply as Character
Overall_Score as Real
AverageCoursework_Score as Real

INITIALIZATION OF VARIABLES
TestPaper_Score1 0
TestPaper_Score2 0
TestPaper_Score3 0
ClassProject_Score 0
Exam_Score 0
Students_Name 0
WeightedCourseWork_Score 0
WeightedExam_Score 0
Letter_Grade 0
Overall_Score 0
AverageCoursework_Score 0
Students_Name ” “
Letter_Grade ” “
Person_Reply ” “

BEGIN

Print “Do you want to do a transaction? Type Y or N”


Read Person_Reply
While Person_Reply <> “N”
Print “Enter Students Name”
Read Students_Name
Print “Please Enter First Unit Test”
Read TestPaper_Score1
Print “Please Enter Second Unit Test”
Read TestPaper_Score2
Print “Please Enter Third Unit Test”
Read TestPaper_Score3
Print “Please Enter Project Score”
Read ClassProject_Score
Print “Please Enter Exam Scores”
Read Exam_Score

AverageCoursework_Score ( TestPaper_Score1 + TestPaper_Score2 +


TestPaper_Score3 + ClassProject_Score)/4
WeightedCourseWork_Score ( AverageCoursework_Score *
CourseWork_Percentage )
WeightedExam_Score ( Exam_Score * Exam_Percentage )
Overall_Score ( WeightedExam_Score + WeightedCourseWork_Score )
IF Overall_Score >= 90 then
Letter_Grade  “A”
Else IF Overall_Score >= 80 and Overall_Score <= 89 then
Letter_Grade  “B”
Else IF Overall_Score <= 70 and Overall_Score <= 79 then
Letter_Grade  “C”
Else IF Overall_Score >= 60 and Overall_Score 69 then
Letter_Grade  “D”
Else IF Overall_Score >= 0 and Overall_Score 59 then
Letter_Grade  “E”
ENDIF
ENDIF
ENDIF
ENDIF
ENDIF
Print “Students Name is “,Students_Name
Print “Students Weighted Course Work Score is: “,WeightedCourseWork_Score
Print “Students Weighted Exam Score is “,WeightedExam_Score
Print Students Overall Score is “,Overall_Score
Print Students Letter Grade is “,Letter_Grade
Print “Do you want to do another transaction? Type Y or N”
Read Person_Reply
ENDWHILE
END
Test Data

Students Name Test 1 Test 2 Test 3 Project Exam


Score Score
Janae Adams 45% 78% 55% 96% 97%
Simone Adams 98% 78% 100% 89% 100%
Micah Blake 78% 58% 94% 59% 45%
Krissy Brown 76% 78% 74% 59% 97%
Kyandra Brown 78% 88% 97% 85% 100%
Screenshots of Working Program

References
 Information Technology for CSEC Examination 3rd
Edition by Howard Cambell and Alan Wood
 https://replit.com/~

You might also like