Exercise · Q7
Q.Write pseudocode that will perform the following:
a) Read the marks of three subjects: Computer Science, Mathematics and Physics, out of 100
b) Calculate the aggregate marks
c) Calculate the percentage of marks
Tripura TbseTextbookSubjective· 3mImportance★★★★★est
69% · 25/36 Questions
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →Input the three subject marks, sum them for the aggregate, and compute percentage as (aggregate ÷ 300) × 100 since each subject is out of 100.
The idea. Three inputs, one sum, one ratio. The only conceptual step is the percentage: with each paper out of 100, the maximum aggregate is 3 × 100 = 300, so the percentage is the aggregate expressed as a fraction of 300, times 100.
Pseudocode
MARKS_PERCENTAGE_ALGO
Step 1: INPUT csMarks (Computer Science, out of 100)
Step 2: INPUT mathsMarks (Mathematics, out of 100)
Step 3: INPUT physicsMarks (Physics, out of 100)
Step 4: COMPUTE aggregate = csMarks + mathsMarks + physicsMarks
Step 5: COMPUTE percentage = (aggregate / 300) * 100
Step 6: PRINT "Aggregate marks =", aggregate
Step 7: PRINT "Percentage =", percentage
END
Python verification
csMarks = float(input("Enter Computer Science marks (out of 100): "))
mathsMarks = float(input("Enter Mathematics marks (out of 100): "))
physicsMarks = float(input("Enter Physics marks (out of 100): "))
aggregate = csMarks + mathsMarks + physicsMarks
percentage = (aggregate / 300) * 100
print("Aggregate marks =", aggregate)
print("Percentage =", percentage)
Sample run
Enter Computer Science marks (out of 100): 80 …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.