Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 60

CS ASSIGNMENT

Submitted to Deepak Singh


Created by Aviral Mer

School
R.no-5
Acknowledgement

I am thankful to my computer teacher for


his ongoing support during the project,
from initial advice, and encouragement,
which led to the final report of this
project. I wish to thank my parents as
well for their undivided support and
interest who inspired me and encouraged
me to go my own way, without whom I
would be unable to complete my project.
At the end, I want to thank my friends
who displayed appreciation to my work
and motivated me to continue my work.
Table of Contents

◦ Basic program 1-10

◦ Dictionary 10

◦ Array based program 11-17

◦ List based program 18-26

◦ String and number 27-28

◦ Other Programs 29-42

◦ SQL 42-50
1

Program to find factorial of a number

Output
2

Program to find Compound Interest

Output
3

Program to find Armstrong number

Output
4

Program to check the number is prime or not

Output
5

Program to print nth no of fabonacci series

Output
6

Program to print to the nth no of fabonacci series

Output
7

Program to reverse a number

Output
8

Program to count alphabets,digits and character

Output
9

Program to find the length by len method

Output
10

Program to count vowel from the string

Output
11

Program to sort the dictionary

Output
12

Program to find the sum of array

Output
13

Program to find largest element in the array

Output
14

Program to split the array

Output
15

Program to check the element with an array can


form AP

Output
16

Program to find the nth term from the elements


given in an array

Output
17

Program to interchange the even position with odd


position

Output
18

Program to toss by randomness

Output
19

Program to break list into chunks

Output
20

Program to find the length

Output
21

Program to multiply a list

Output
22

Program to remove duplicates from a list

Output
23

Program to reverse a list

Output
24

Program to sorting a list by bubble sort

Output
25

Program to sort a list by insertion sort

Output
26

Program to sort a list by selection sort

Output
27

Program to check palindrome of a number

Output
28

Program to check poalindrome of a string

Output
29

Program to remove the ith character from the


string

Output
30

Program to print positive number in a list

OUTPUT
31

Program to print negative number in a list

OUTPUT
32

Program to clear a list by different ways

OUTPUT
33

Program to print the second largest and smallest


number in a list

OUTPUT
34

Program to print third largest and smallest number


in a list

OUTPUT
35

Program to find and count the even number in a


list

OUTPUT
36

Program to find ASCII number of a character

OUTPUT
37

Program to print the nth element

OUTPUT
38

Program to print the nth character from string

OUTPUT
39

Program to find all items in a dictionary

OUTPUT
40

Program to check the list in sorted or not

OUTPUT
41

Program to find the cumulative sum

OUTPUT
42

Program to find occurrence of each element in a


list

OUTPUT
Program to convert 12 hour time table to 24 time zone

OUTPUT
Program to merge two dictionary

OUTPUT
Program to count the frequency of the element in the
dictionary

OUTPUT
Program to calculate age

OUTPUT
Program to demonstrate basic Euclid division

OUTPUT
43

Program to create a database


44

Program to create a table


45

Program to describe a table


46

Use of Alter in a program


47

Program to drop a table or a database


Inserting value in a table
Selecting a from a table
Selecting an attribute from a table
To change the attribute temporarily
Using where clause

You might also like