You are on page 1of 29

COMPUTER SCIENCE

(CODE 083)

PRACTICLE FILE
2019-20

XI-D

Submitted by: Submitted to:


Kumar Varenya Mrs. Suneeta Jena

Roll no: 15

1
ACKNOWLEDGEMENT

I would like to express my special thanks of


gratitude to my teacher Mrs. Suneeta Jena as well
as our Principal who gave me the golden
opportunity to do these practicals, which also
helped me in doing a lot of research and for guiding
me. Their constructive advice and constant
motivation has been responsible for the successful
completion of this practical file. I am really thankful
to them.
I would also like to thank my parents and friends
who helped me in finalizing this practical file within
the limited time frame.

Kumar Varenya

CERTIFICATE2
This is to certify that Kumar Varenya of class
XI-D has successfully completed this computer
science project file prescribed Mrs. Suneeta
Jena ma’am during the academic session 2019-
20 as per guidelines issued by Central Board of
Secondary Education.

Mrs. Suneeta Jena


P.G.T Computer Science

INDEX
Python

1. Write a program that reads a line and prints the following information:
Number of uppercase letters, number of lowercase letters, number of

3
alphabets and number of
digits………………………………………………………6

2. Write a program that reads a line and a sub-string. It should then display
the number of occurrences of the given substring in the
line………………….……7

3. Write a program to check whether the given number is a


palindrome or
not……………………………………………………………….……8

4. Write a program to print the Fibonacci series up to n


values…………………….…9

5. Write a program to print the given patterns……………………………………10-13

6. Write a program to find i) Area and perimeter of a


triangle.……………….……...14
ii) Area and circumference of a
circle..……………….….15

7. Write a program to find whether a given year is leap year or


not…………………16

8. Write a program to check whether the given string is a


palindrome or
not.………………………………………………………….……….17

9. Write a program to perform arithmetic calculation using switch…………………18

10. Write a program to print roots of a quadratic equation……………………………19

11. Write a program to convert temperature from Celsius to Fahrenheit


scale and vice-versa..……………………………………………………………..20-
21

12. Write a program to print all prime numbers up to n………………………………22

13. Write a program that asks the user how many items they’re buying
and print the total cost in the given
situation……………………………………...23

14. Write a program to print the given


pattern..………………………………………24

15. Write a program that takes a multiple word string and then capitalizes
the first letter of each word, then forms a new string out of
it........……………….25

4
16. Write a program to find minimum element from a list of element along
with its index in the
list.……………………………………………………………26

17. Write a program to find the second largest number in a list of numbers...………27

18. Write a program that returns the length of the shortest string in a tuple
of strings. The tuple should contain at least one
element…………………………28

19. Write a program to sort a given list using insertion


sort………………………….29

20. Write a program to sort a given list using bubble


sort…………………………….30

MySQL
1. Assignment
1……………………………………………………………………….31
2. Assignment
2……………………………………………………………………….33
3. Assignment
3……………………………………………………………………….35

Write a program that reads a line and prints the following information:
1 Number of uppercase letters, number of lowercase letters, number of
alphabets and number of digits.
5
PROGRAM:

OUTPUT:

Write a program that reads a line and a sub-string. It should then display the
2 number of occurrences of the given substring in the line

6
PROGRAM:

OUTPUT:

3 Write a program to check whether the given number is a palindrome or not

PROGRAM:

7
OUTPUT:

4 Write a program to print the Fibonacci series up to n values

PROGRAM:

8
OUTPUT:

5 Write a program to print the given patterns:

I. 1
12
123

9
1234
12345

PROGRAM:

OUTPUT:

II. 12345
1234
123
12
1

PROGRAM:

10
OUTPUT:

III. 54321
5432
543
54
5

PROGRAM:

11
OUTPUT:

IV. 1
22
333
4444
55555

PROGRAM:

12
OUTPUT:

6 Write a program to find:

I. Area and Perimeter of Triangle

PROGRAM:

13
OUTPUT:

II. Area and Circumference of Circle

PROGRAM:

14
OUTPUT:

7 Write a program to find whether a given year is leap year or not

PROGRAM:

15
OUTPUT:

8 Write a program to check whether a given string is a palindrome or not

PROGRAM:

16
OUTPUT:

9 Write a program to perform arithmetic calculation using switch.

PROGRAM:

17
OUTPUT:

10 Write a program to find roots of a quadratic equation.

PROGRAM:

18
OUTPUT:

11 Write a program to convert temperature from Celsius to Fahrenheit


scale and vice-versa.
I. Celsius to Fahrenheit

PROGRAM:

19
OUTPUT:

II. Fahrenheit to Celsius

PROGRAM:

OUTPUT:

Write a program to print all the prime numbers up to the number given by the
12
user

PROGRAM:

20
OUTPUT:

A store charges Rs.120/item if you buy less than 10 items, if you buy between
10 and 99 items the cost is Rs.100/item, if you buy 100 or more items the cost
13
is Rs.70/item. Write a program that asks the user how many items they’re
buying and print the total cost.

PROGRAM:

21
OUTPUT:

14 Write a program to print the following pattern


scale and vice-versa.

PROGRAM:

22
OUTPUT:

Write a program that takes a string with multiple worlds and then capitalizes
15
the first letter of each word, then forms a new string out of it
scale and vice-versa.
PROGRAM:

23
OUTPUT:

Write a program to find minimum element from a list of element along with it
16
its index
scale and vice-versa.

PROGRAM:

24
OUTPUT:

17 Write a program to find the second largest number of a list of numbers


scale and vice-versa.

PROGRAM:

25
OUTPUT:

Write a program that returns the length of the shortest string in tuple of strings.
18
The tuple should contain at least one element
scale and vice-versa.

PROGRAM:

26
OUTPUT:

Given 2 dictionaries D1 and D2; Write a program that lists the overlapping
19
Keys of the two dictionaries and vice-versa.

PROGRAM:

27
OUTPUT:

20 Write a program to sort a given list using insertion sort

PROGRAM:

OUTPUT:

28
21 Write a program to sort a given list using bubble sort

PROGRAM:

OUTPUT:

29

You might also like