Practicals (2nd Year Computer Science)
Practicals (2nd Year Computer Science)
Science
Practicals
ICS- Class 12
F.A.
1-June-24
Friday/
F.Sc.
B.A.
F.A.
2-July-24
Saturday/
F.Sc.
B.A.
F.A.
4-July-24
Monday/
F.Sc.
B.A.
Practical 3: Prepare the following document in the same format and save it against your
Roll NO.
“A program flow chart is a detailed graph that represents steps to be performed with in the
computer to produce the needed output”.
Some of flow chart symbols and their descriptions are as given below:
Symbols Description
Used to indicate some types of decision.
Used to indicate start and stop.
Used to indicate Input / Output.
Used to indicate processing
Day 2
Practical 1: Prepare the following document in the same format:
ARE YOU LOOKING FOR IT COURSES
We Offer
Java certification Golden
Computer application Opportunity
Diploma in office management
Diploma in computer science
Admission Open for Executive Program for the session 2025
Features
Chemistry
Pak.Study
Computer
Obtained
Position
English
Physics
Marks
Grade
Math
Urdu
Isl.
Picture
Admission Open
We Facilitate
A Career Path Golden
Job Placement
GOLDEN OPPORTUNITY
Opportunit
Qualified Faculty y
Free Network Access
Equipped Lab
Free Books
Contact:
Department of Information Technology
Prof. Areeda Shah
0300-1234567
Practical 3: Prepare the following document in the same format.
ENTRY TEST FORM
Name in (Capitalized)
Department:
Roll No: Class:
Student Card No:
Phone No: E-Mail
Postal Address
Father’s Name
Name of University/ Institution
Practical 2: Create a new workbook and prepare a worksheet of the same format as shown
below:
Weather Report
Temperature
Rain (mm)
Name of
Max Min
City
Practical 3: Create a new workbook and prepare a worksheet of the same format as shown
below:
Create a new worksheet based on the format given below.
Apply the formula to calculate the class-wise vacancy status on the following
instructions.
o If total number of students in all THREE sections is greater or equal to 90,
show the message in 5th column as “No vacancy available”.
o If total numbers of students in all THREE sections are less than 90, show the
message in 5th column, as “Vacancies are available”.
o Calculate the available vacancies for the 6th column (if total numbers of
vacancies are 90).
Apply CONDITIONAL FORMATTING utility to highlight more than 30
students in each class in yellow color.
Number of Students Class-wise Available
Section/Class
A B C Vacancy Status Vacancies
VI 30 30 30
VII 34 14 30
VIII 40 25 34
IX 18 23 20
X 30 29 30
Day 9
Practical 1: Enter rainfall data of different cities of the given months into cells of worksheet
as given below:
Cities June July August September
Karachi 40 25.0 42 65
Lahore 50 45.0 65 75
Murree 10 123.0 12 25
Islamabad 15 121.0 135 24
Perform the following operations:
Draw a Column chart
Show data of table
Practical 2: Create a new workbook and prepare a worksheet of the same format as shown
below:
HOURLY PRODUCTION PERFORMANCE OF NEXTCOLA DRINK
FACTORY
Plant/Capacity 1st 2nd 3rd 4th
Plant Status Difference
Per/hour Hour Hour Hour Hour
Plant 1 100 100 100 100 Plant is full 0
Plant 2 100 150 100 100 Plant is unable to fill -50
more bottles
Perform the following operations:
Apply formula to check the production capability of each plant in different
hours on the following instructions. Each plant can fill 100 bottles per hour.
If bottles are < target, “Plant Status” column show the message s “Bottles can
fill more”.
If bottles are = to target, “Plant Status” column show the message as “Plant is
full”.
If bottles are > target, “Plant Status” column show the message as “Plant is
unable to fill more bottles”.
Practical 3: Create a new workbook and prepare a worksheet of the same format as shown
below:
Query Performance Sheet of Computer Department
Roll Total
Dated ICS BCS MCS Performance
No Queries
587 7/7/11 15 10 12 37 Excellent
Practical 2: Create a new workbook and prepare a worksheet of the same format as shown
below:
Pakwatan Pvt Limited
Name Designation Salary Bonus Sale Commission Pay
Ali Supervisor 15,000 3000 1,50,000
1) Write a program to convert 20.5 centigrade temperature into Fahrenheit using the formula
F=9/5C+32 and print the temperature in Fahrenheit.
2) Write a program to get temperature in Fahrenheit and find temperature in Centigrade by
using the formula C=5/9(F-32).
3) Write a program to get the radius of a circle and calculate area & circumference of the
circle.
Formula for Area of circle = πR2
Formula for Circumference of circle = 2πR
Value of π is = 3.1417
4) Write a program to find the distance covered by a body in 20.5 seconds. The initial
velocity of body is 15.8 meter per second and acceleration is 10.2 m/sec2. The formula to
calculate distance is: S=vit + ½ at2.
Day 12
1) Write a program to get the values of three sides of a triangle and calculate its area using
the formula:
area = s(s–a)(s–b)(s–c) where s = (a+b+c)/2
2) Write a program to interchange values of two variables using assignment statement and
print the exchanged values on the screen.
3) Write a program to test whether a given integer is odd or even using simple ‘if’ structure.
4) A year is a leap year if it is divisible four, except that any year divisible by 100 is a leap
year only if it is divisible by 400. Write a program that inputs a year such as 1800, 1996
and 2010, and display “Leap year” if it is leap year, otherwise displays “Not a leap year”.
Day 13
1) Write a program to get three numbers and find out the largest number of three numbers
using nested if else statement.
2) Write a program to find whether a number is positive, negative or zero using ‘if-else-if’
structure.
3) Write a program that inputs temperature and displays a message according to the following
data:
Temperature Message
Greater than 35 Hot day
Between 25 and 35 (inclusive) Pleasant day
Less than 25 Cool day
4) Write a program to input average marks of a student and find out the grade based on the
average marks. Use the nested ‘if-else’ structure.
Day 14
1) Write a program to get a single digit and print the input value in words using switch
statement. For example, if digit 3 is entered then print “Three” and so on.
2) Write a program to perform simple arithmetic calculations by using switch statement.
3) Write a program to get three numbers and find out the smallest number of three numbers
using nested if else statement.
4) Write a program to input an integer value and print the digits of the value in reverse order.
For example, if input value is 1235, it should be printed as 5321.
5) Write a program to print odd numbers from 1 to 10 by using while loop structure.
Day 15
1) Write a program to print the multiplication table of a given number by using while loop
statement.
2) Write a program to calculate the factorial of an integer by using while loop statement.
(Hint: For example, the formula to find the factorial of number 4 is (4*3*2*1)
3) Write a program to generate following series by using do-while loop statement:
1,5,25,125,625
4) Write a program to print the even numbers in first 15 numbers in descending order by using
for loop statement.
5) Write a program to find the sum of the following series:
1+1/2+1/3+….+1/50
Day 16
1) Write a program to print the output as shown below by using while nested loop.
*
**
***
****
*****
2) Write a program to print the output as shown below by using for nested loop.
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1
3) Write a program that inputs a number and displays the message “Prime number” if it is a
prime number, otherwise displays “Not a prime number”.
4) Write a program that displays the following pattern using nested loop.
* * * * *
* * * *
* * *
* *
*