0% found this document useful (0 votes)
23 views13 pages

KV CS Practical File

The document is a practical file for a Computer Science course that includes a series of programming exercises. Each exercise requires writing code to perform specific tasks, such as calculating areas, checking for prime numbers, and creating patterns. The file is structured for students to fill in their name, class, and roll number, along with the code and output for each exercise.

Uploaded by

studentworksat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views13 pages

KV CS Practical File

The document is a practical file for a Computer Science course that includes a series of programming exercises. Each exercise requires writing code to perform specific tasks, such as calculating areas, checking for prime numbers, and creating patterns. The file is structured for students to fill in their name, class, and roll number, along with the code and output for each exercise.

Uploaded by

studentworksat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

PM Shree KV NO.

1 AFS
Grurugram

Computer Science
Practical File
Name :- ____________________
Class :- ____________________
Roll no. :- ____________________
1. Write a program to accepts two integers and print their sum.

Code:-

Output:-

2. Write a program that accepts radius of a circle and prints its area.

Code:-

Output:-
3. Write a program that accepts base and height and calculate the area of
triangle.

Code:-

Output:-

4. Write a program that inputs a student’s marks in three subjects (out of 100)
and prints the percentage marks.

Code:-

Output:-
5. Write a program to calculate simple interest.
Code:-

Output:-

6. Write a program to find whether a given number is even or odd.


Code:-

Output:-

i.

ii.
7. Write a program to find largest among three integers.
Code:-

Output:-

8. Write a program to find lowest among three integers.

Code:-

Output:-
9. Write a program that accepts weight in Kg and height in meters and
calculate the BMI.
Code:-

Output:-

10. Write a program to accept the marks of five subjects and calculate the
average marks.
Code:-

Output:-

11. Write a program to accept the year and check if it is a leap year or not.
Code:-
Output:-

12. Write a program to input percentage marks of a student and find the grade
as per the following criterion:
Marks Grade
>=90 A
75-90 B
60-75 C
Below 60 D
Code:-

Output:-

13. Write a program to enter a number and check if it is a prime number or


not.
Code:-
Output:-

14. Write a program that reads two numbers and an arithmetic operator and
displays the computed result.
Code:-

Output:-

15. Write a program to create a triangle of stars using nested loop.


Code:-

Output:-
16. Write a Python script to print Fibonacci series’ first 20 elements.
Code:-

Output:-

17. Input three angles and determine if they form a triangle or not.
Code:-

Output:-

18. Write python script to print following pattern.


1
13
135
1357
Code:-
Output:-

19. Write a program to print a pattern like:


4321
432
43
4
Code:-

Output:-
20. WAP to store students’ details like admission number, roll number, name
and percentage in a dictionary and display information on the basis of
admission number.

Code:-

Output:-
21. WAP to accept values from user and create a tuple.
Code:-

Output:-

You might also like