0% found this document useful (0 votes)
34 views

Practical File Last

The document contains instructions for 5 Excel practical exercises: 1. Create a utility bill worksheet that calculates unit consumption, electricity charge, surcharge, and payable amount. 2. Create a worksheet showing expenditures of Pakistan Printing Press in 2023 with formulas to calculate totals, minimum, maximum, and average expenditures. 3. Create a worksheet with formulas to calculate gross amount, net amount, sale price, and profit. 4. Create a worksheet showing provincial expenditures in 2022 with a column chart and formulas to calculate totals. 5. Create an attendance register showing 10 days with formulas to calculate total attendance and percentage.

Uploaded by

Hassan Adil
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Practical File Last

The document contains instructions for 5 Excel practical exercises: 1. Create a utility bill worksheet that calculates unit consumption, electricity charge, surcharge, and payable amount. 2. Create a worksheet showing expenditures of Pakistan Printing Press in 2023 with formulas to calculate totals, minimum, maximum, and average expenditures. 3. Create a worksheet with formulas to calculate gross amount, net amount, sale price, and profit. 4. Create a worksheet showing provincial expenditures in 2022 with a column chart and formulas to calculate totals. 5. Create an attendance register showing 10 days with formulas to calculate total attendance and percentage.

Uploaded by

Hassan Adil
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 56

EXCEL PRACTICALS

Practical No 1
Object
Create and print Utility Bill.
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 1 of 56
Meter Previous Current Units Electricity Amount
Number Unit Unit Consumed Charge Surcharge Payable
SN-2201 79536 79633 25

SN-44202 15000 15221 25

SN-51203 76321 76428 25

SN-56204 5853 5996 25

Procedure
1. Open MS Excel.
2. Select a new blank sheet.
3. Write a Heading of Utility Bill.
4. Make the format of Utility Bill.
5. Write a formula to calculate no of units consumed.
6. Calculate Electricity Charges.
7. Calculate Surcharge.
8. Calculate Total Amount.
9. Save file
10. For saving file click on file menu than click on save OR press
Ctrl + S.

11. Give a name to the file. Such as “Practical 1”.


12. Print the page.
13. For printing page click on file than click print or press Ctrl + P.
14. Close the Program.

Formula
1. To Calculate Unit Consumed.

=C4-B4
2. To Calculate Electricity Charge

=D4*25

3. To Calculate Surcharge

=F4/100*15

4. To Calculate Amount Payable

= F4+G4

Output

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 2 of 56


Practical No 2

Object
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 3 of 56
Using the Spreadsheet, create and print the Expenditure of Pakistan Printing press in the
Year of 2023 (in Rs. Million).

Procedure

1. Open MS Excel.
2. Select a new blank sheet from file menu.
3. Create sheet that show Expenditure of Pakistan Printing press.

4. Insert the formula as the given instruction.


5. Set margins.
6. Save file OR Save as.
7. For saving file click on file menu than click on save OR press Ctrl + S.
8. Give a name to the file. Such as “Practical 2”.
9. Print the page.
10. For printing page click on file than click print or press Ctrl + P.
11. Close the Program

Formula:

1. For Calculate the Grand Total.


= SUM (B4:B9)

2. For Calculate the Minimum Expenditure


=MIN (B4:B9)

3. For Calculate the Maximum Expenditure


=MAX (B4:B9)

4. For Calculate the Average

=AVERAGE (B4:B9)

Output

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 4 of 56


Practical No 3

Object
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 5 of 56
Using the Spreadsheet according to the instructions

Procedure

1. Open MS Excel.
2. Select a new blank sheet from file menu.
3. Create Sheet.

1. Insert the formula as the given instruction.


2. Set margins.
3. Save file OR Save as.
4. For saving file click on file menu than click on save OR press Ctrl + S.
5. Give a name to the file. Such as “Practical 3”.
6. Print the page.
7. For printing page click on file than click print or press Ctrl + P.
11. Close the Program

Formula

1. For Calculate the Gross Amount


=B6+C6+D6

2. For Calculate the Net Amount


=E6-(E6/100*2)

3. For Calculate the Sale Price


=F6 + (F6/100*30)

4. For Calculate the Profit

=G6-F6

Output

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 6 of 56


Practical No 4

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 7 of 56


Object

Create and print a sheet of Expenditure by different Provinces in Year 2022

(in Rs. Million) Show using Column Chart.

Procedure

1. Open MS Excel.
2. Select a new blank sheet from file menu.
3. Create Expenditure by different Provinces.
4. Create the column chart using the chart wizard from insert menu.
5. Set margins.
6. Save file OR Save as.
7. For saving file click on file menu than click on save OR press Ctrl + S.
8. Give a name to the file. Such as “Practical 4”.
9. Print the page.
10. For printing page click on file than click print or press Ctrl + P.
12. Close the Program

Output

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 8 of 56


NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 9 of 56
Practical No 5

Object
Create and print Attendance Register page showing 10 days attendance.

Procedure

1. Open MS Excel.
2. Select a new blank sheet from file menu.
3. Create Attendance Register.
4. Insert the formula as the given instruction.
5. Set margins.
6. Save file OR Save as.
7. For saving file click on file menu then click on save OR press Ctrl + S.
8. Give a name to the file. Such as “Practical 5”.
9. Print the page.
10. For printing page click on file then click print or press Ctrl + P.
11. Close the Program.

Formula

1. For Calculate total attendance

=COUNTIF (C4:L4,"P")

For Calculate the Percentage

2. =M4/10*100

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 10 of 56


Output

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 11 of 56


C LANGUAGE
PRACTICALS

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 12 of 56


Practical 1

Write a program that take as input the price of a box of chocolates and total
number of chocolates in the box. The program finds and displays the price of
one chocolate. Also draw its flowchart.

ALGORITHM

Step 1 : START
Step 2 : INPUT box price
Step 3 : INPUT number of chocolates
Step 4 : unit price = box price/ number of chocolates
Step 5 : PRINT unit price
Step 6 : END

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 13 of 56


FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 14 of 56


CODE
#include<stdio.h>
void main ()
{
float bp, up, n;
printf("Enter the price of box: ");
scanf("%f",&bp);
printf("Enter the number of chocolate in the box: ");
scanf("%f",&n);
up= bp/n;
printf("The price of single chocolate is %2f",up);
}

OUTPUT

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 15 of 56


Practical 2
Write a program that takes as input the length and width of a rectangle the
program calculates and prints the area of rectangle. Also draw its flowchart.
ALGORITHM
Step 1 : START
Step 2 : INPUT length, width
Step 3 : Find area
area=length*width
Step 4 : OUTPUT area
Step 5 : END

FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 16 of 56


CODE
#include<stdio.h>
void main()
{
Float length, width, area;
printf("Enter Length Of Rectangle :");
scanf("%f", & length);
printf("Enter The Width Of Rectangle :");
scanf("%f",& width);
area = length * width;
printf("Area Of Rectangle:%.2f",area);
}

OUTPUT

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 17 of 56


Practical 3

Write a program that takes radius of a circle as input. The program should
calculate and displays the Area and Circumference of circle. Also draw its
flowchart.
ALGORITHM
Step 1 : START
Step 2 : INPUT rad
Step 3 : Find the area
area= 3.14 x rad x rad
Step 4 : Find the circumference, cir
cir= 2 x 3.14 x rad
Step 5 : PRINT
area
cir
Step 6 : END

FLOWCHART
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 18 of 56
CODE
#include<stdio.h>
void main()
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 19 of 56
{
float rad, area, cir;
printf ("Enter a Radius:");
scanf ("%f",&rad);
area=3.14*rad*rad;
cir=2*3.14*rad;
printf ("Area Of Circle:%2f\n",area);
printf ("Circumferance:%2f",cir);
}

OUTPUT

Practical 4

Write a program to print the area and perimeter of a square when one side is
given. Also draw the flowchart.
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 20 of 56
ALGORITHM
Step 1 : Start
Step 2 : INPUT side
Step 3 : CALCULATE area by side * side
Step 4 : CALCULATE peri by 4* side
Step 5 : PRINT area of square in area
Step 6 : PRINT area of square in peri
Step 7 : END

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 21 of 56


FLOWCHART

CODE
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 22 of 56
#include<stdio.h>
void main()
{
float side,area,peri;
printf("Enter Lenght of side of square:");
scanf("%f",&side);
area=side*side;
peri=4*side;
printf("Area of square: %0.2f\n",area);
printf("Perimeter of square: %0.2f\n",peri);
}
OUTPUT

Practical 5
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 23 of 56
Write a program that inputs basic salary, number of sold and broken items.it
then calculates the gross salary of the employee. The bonus is Rs.10000 if
sold items are more than 100 and broken items are 0. Otherwise the bonus is
0.
ALGORITHM
STEP 1 : START
STEP 2 : INPUT bas, sol, bro
STEP 3 : IF sol > 100 AND bro =0 THEN bon=10000
ELSE gro=bas+(sol * 8) +bon
STEP 4 : PRINT gro
STEP 5 : END

FLOWCHART
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 24 of 56
CODE
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 25 of 56
#include<stdio.h>
void main ()
{
int bas, sol, bro, gro, bon=0;
printf ("enter basic salary:");
scanf ("%d”, &bas);
printf ("enter the number of sold items:");
scanf ("%d”, &sol);
printf ("enter the number of broken items:");
scanf ("%d”, &bro);
if(sol>100&&bro==0)
bon=10000;
gro=bas+(sol*8) +bon;
printf ("gross salary is %d”, gro);
}
OUTPUT

Practical 6
Write a program that inputs a year and determines whether it is a leap year or
not.
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 26 of 56
ALGORITHM
Step 1 : START
Step 2 : INPUT year
Step 3 : IF (year / 4) = 0
PRINT "Leap year"
ELSE
PRINT "Not leap year"
Step 4 : STOP

FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 27 of 56


CODE
#include<conio.h>
void main()
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 28 of 56
{
int year;
printf("Enter A Year:");
scanf("%d",&year);
if(year%4==0)
printf("Leap Year");
else
printf("Not Leap Year");
}

OUTPUT:

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 29 of 56


Practical 7

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 30 of 56


Write a program that inputs a number from user and determines whether it is
positive, negative or zero. Also draw its flowchart.
ALGORITHM
Step 1 : START
Step 2 : INPUT n
Step 3 : IF n>0 THEN
PRINT "The Number Is Positive"
ELSE IF n<0 THEN
PRINT "The Number Is Negative"
ELSE
PRINT "The Number Is Zero"
Step 4 : END

FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 31 of 56


CODE

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 32 of 56


#include<stdio.h>
void main()
{
int n;
printf("Enter a number:");
scanf("%d",&n);
if(n>0)
printf("The number is positive");
else if(n<0)
printf("The number is negative");
else
printf("The number is zero");
}
OUTPUT

Practical 8
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 33 of 56
Write a program to calculate the electricity bill accordingly to the following
formula:
Bill= units consumed x unit price
Also draw its flowchart.

ALGORITHM
Step 1 : START
Step 2 : INPUT units
Step 3 : Calculate the unit
IF (units >400)
bill = units * 20
ELSE IF (units >200)
bill = units * 15
ELSE
bill = units * 12
Step 4 : PRINT bill
Step 5 : END

FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 34 of 56


CODE
#include<conio.h>
void main()
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 35 of 56
{
int units, bill;
printf("Enter Units Consumed : ");
scanf("%d",&units);
if (units>400)
bill=units*20;
else if(units>200)
bill=units*15;
else
bill=units*12;
printf("Total Bill Is Rs. %d",bill);
}
OUTPUT

Practical 9
Write a program that takes percentage marks of a student as input and
displays his grade. The following table shows the grade criteria

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 36 of 56


ALGORITHM
Step 1 : Start
Step 2 : INPUT percent
Step 3 : IF percent>=80 THEN
PRINT "A" otherwise GOTOStep 4
Step 4 : IF percent>=70 THEN
PRINT "B" otherwise GOTOStep 5
Step 5 : IF percent>=60 THEN
PRINT "C" otherwise GOTO Step 6
Step 6 : IF percent>=50 THEN
PRINT "D" otherwise GOTOStep7
Step 7 : ELSEPRINT "F"
Step 8 : END

FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 37 of 56


CODE
#include<stdio.h>
void main()

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 38 of 56


{
float percent;
printf("Enter The Percentage Marks: ");
scanf("%f",&percent);
if(percent>=80)
printf("A");
else if (percent>=70)
printf("B");
else if (percent>=60)
printf("C");
else if (percent>=50)
printf("D");
else
printf("F");
}
OUTPUT

Practical 10
Write a program that enters three numbers and prints the two larger ones.
ALGORITHM
Step 1 : START
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 39 of 56
Step 2 : INPUTvariablea,b,c
with different numbers
Step 3 : IF a<b AND a<c
PRINTb,c
ELSE IF b < c
PRINTa,c
ELSE
PRINTa,b
Step 4 : END

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 40 of 56


FLOWCHART

CODE
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 41 of 56
#include<stdio.h>
void main()
{
int a,b,c;
printf("Enter three numbers : ");
scanf("%d %d %d",&a,&b,&c);
if(a<b && a<c)
printf("The Largest Two Numbers Are %d And %d.",b,c);
else if(b<c)
printf("The Largest Two Numbers Are %d And %d.",a,c);
else
printf("The Largest Two Numbers Are %d And %d.",a,b);
}
OUTPUT

Practical 11

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 42 of 56


Write a program that prints integers from 10 to 1 (reverse order using loop).
Also draw its flowchart.
ALGORITHM
Step 1: START
Step 2: LET n= 10
Step 3: IF n>=1 THEN
GOTO STEP 4
ELSE
GOTO STEP 6
Step 4: PRINT n
Step 5: n = n - 1
GOTO STEP 3
Step 6: END

FLOWCHART
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 43 of 56
CODE

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 44 of 56


#include<stdio.h>
void main()
{
int n;
for(n=10;n>=1;n--)
printf("%d",n);
}
OUTPUT

Practical 12
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 45 of 56
Write A Program That Prints Alphabets from A to Z using Loop. Also draw
its flowchart.
ALGORITHM
Step 1 : Start
Step 2 : Let ch, be A
Step 3 : Print
Step 4 : If Character Is Lesser Or Equals To ‘Z’, Go to 3
Step 5 : If Character Is Greater Then ‘Z’, Go To 6
Step 6 : Stop

FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 46 of 56


CODE

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 47 of 56


#include<stdio.h>
void main()
{
char ch;
for (ch='A'; ch<='Z'; ch++)
printf("%c",ch);
}
OUTPUT

Practical 13
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 48 of 56
Write a program that takes a number as an input and prints its multiplication
able up to 10. Also draw its flowchart.

ALGORITHM
Step 1: START
Step 2: INPUT table number
Step 3: c=1
Step 4: IF c<=10 THEN GOTO STEP 5
ELSE GOTO STEP 7
Step 5: PRINT table no.,c,tab*c
Step 6: c=c+1
GOTO STEP 4
Step 7: END

FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 49 of 56


CODE
#include<stdio.h>

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 50 of 56


main()
{
inttab,c;
printf("Enter number for table: ");
scanf("%d",&tab);
for(c=1;c<=10;c++)
printf("%d*%d=%d\n",tab,c,tab*c);
}
OUTPUT

Practical 14

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 51 of 56


Write a program that takes input “n” from the user and prints the sum of first
“n” numbers and their average. Also draw its flowchart.

ALGORITHM
STEP 1 : START
STEP 2 : INPUT N
STEP 3 : SUM=SUM+C
STEP 4 : Sum =%.2f
STEP 5 : Sum/n
STEP 6 : OUTPUT Sum, Av
STEP 7 : END

FLOWCHART

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 52 of 56


CODE
#include<stdio.h>
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 53 of 56
void main()
{
int n, c;
float sum=0;
printf ("Enter a Number :");
scanf("%d", &n);
for(c=1; c<=n;c++)
sum=sum+c;
printf("Sum =%.2f\n",sum);
printf("Average = %.2f",sum/n);
}
OUTPUT

Practical 15

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 54 of 56


Write a program that takes an integer as input from the user and prints
whether the integer is prime or not. Also draw its flowchart.

ALGORITHM
Step 1 : Start
Step 2 : Initialize n, p, j with numbers
Step 3 : Input a value
Step 4 : If n%j==0 let p=0
Step 5 : If p==1 Print n is a prime number
Step 6 : is not a prime number
Step 7 : End
FLOWCHART

CODE
#include<stdio.h>
void main()
NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 55 of 56
{
int n, p, j;
printf("Enter a Number:");
scanf("%d",&n);
p = 1;
for(j=2; j<n; j++)
if(n%j==0)
p = 0;
if(p==1)
printf("%d is a prime number.",n);
else
printf("%d is not prime number.",n);
}

OUTPUT

NAME: HAIQA HASSAN – CLASS: X-A2 (Session 2023-2024) Page 56 of 56

You might also like