University of the Punjab
BA/BSc. Part I
Computer Science Practical
Group 1 – 2018
Solution
Question No 01:
MS Excel
Procedure:
1. I clicked on Start Button and point to the All Programs. All installed programs list appeared.
2. I pointed to the MS Office Folder and click on MS Excel. MS Excel Program opened.
3. I click on Office Button and take new Sheet.
4. Entered data into sheet as given in the question.
5. I selected the data cells in column C and clicked on home tab and home ribbon appeared.
6. I click on Sort And Filter icon and point to Filter option to apply filter to select Area.
7. I wrote a formula to calculate the total income of Rural area.
Formula: =SUMIF(C2:C6, “Rural”, D2:D6)
8. I wrote a formula to calculate the total income of Urban area.
Formula: =SUMIF(C2:C6, “Urban”, D2:D6)
9. I pressed Ctrl + S to save the sheet and give the file name “Income”.
Question No 02:
Program:
Private Sub Command1_click()
Dim hours As Integer, gPay
hours = InputBox(“Enter no of hours worked”)
If hours >40 Then
gPay = (100*40) + (150 * (hours-40)
Else
gPay = hours *100
End If
Print “Gross Pay =”& gPay
End Sub
Please Visit : www.risingeducation.com for more educational stuff.