University of the Punjab
BA/BSc. Part I Computer Science Practical
Group 9 – Annual-2019 Solution
Download Original Papers From:
https://educationhub.pk/pu-ba-bsc-practical-papers-third-year/
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 Header Row and apply shade from home ribbon. And font style Rimes New Roman. I Pressed CTRL +E to Make data Center Align.
6. I Selected cells C2 To C6 and Clicked Conditional Formatting ->Highlight Cell Rules -> Greater Than . and give rule value 1500. Conditional formatting applied.
7. I Selected Cell A7 , B7 and click on Merge and Center on Home Ribbon.
8. I Wrote Total Annual Income in Cell and Press CTRL+R to make it Right Align.
9. I Selected Cell A8, B8 and click on Merge and Center on Home Ribbon .
10. I Wrote Average Annual Income in Cell and Press CTRL+R to make it Right Align.
11. I Selected Cell A9, B9 and click on Merge and Center on Home Ribbon .
12. I Wrote Highest Annual Income in Cell and Press CTRL+R to make it Right Align.
13. I wrote a formula in C7 to Total Annual Income.
Formula: = SUM(C2:E6)
14. I wrote a formula in C8 to Average Annual Income.
Formula: = Average(C2:E6)
15. I wrote a formula in C9 to Highest Annual Income
Formula: = MAX(C2:E6)
16. I pressed Ctrl + S to save the sheet and give the file name “Income”.
Question No 02:
Program:
Private Sub Command1_click()
Dim x , y , z As Integer
x = InputBox(“Enter First No”)
y = InputBox(“Enter Second No”)
z = InputBox(“Enter Third No”)
If (x>=y And x<=z) Or (x<=y And x>=z) Then
MsgBox(“The middle value = “&x)
Elseif (y>=x And y<=z) Or (y<=x And y>=z) Then
MsgBox(“The middle value = “&y)
Else
MsgBox(“The middle value = “&z)
End If
End Sub