1. Draw a flowchart to accept 2 numbers from user and display addition of it.
Calculate
Input Num1 result =
Start
Input Num2 Num1 +
Num2
Display
End
result
2. Write a pseudocode and a python code to accept 5 subject marks from
student and calculate the total and percentage(average) of a student for a
semester and display it.
Start totalMarks = 0
Set totalMarks = 0
For i = 1 to 5 for i in range(1, 6):
Input subjectMark subjectMark =
totalMarks = totalMarks float(input(f"Enter marks for
+ subjectMark subject {i}: "))
End For totalMarks += subjectMark
Set totalSubjects = 5
Set average = totalMarks / totalSubjects = 5
totalSubjects average = totalMarks /
Display "Total Marks: " + totalSubjects
totalMarks
Display "Percentage: " + print("Total Marks:",
average totalMarks)
End print("Percentage:", average)
3. Write a pseudocode and draw a flow chart to accept Basic from an
employee and calculate salary of an employee by considering following
things. (Grade_pay is double of Basic. DA is 70% of Basic. TA is RM 200.
HRA is 20% of Basic.)(Formula for salary = Grade_pay + DA + TA + HRA).
Start
Input Basic
Set Grade_pay = 2 * Basic
Set DA = 0.70 * Basic
Set TA = 200
Set HRA = 0.20 * Basic
Set Salary = Grade_pay + DA + TA + HRA
Display Salary
End