Вы находитесь на странице: 1из 80

COMPUTER

SCIENCE
Vaibhav Shah
12th Science

2019-20
ACKNOWLEDGEMENT
I would like to express my special thanks to my teacher
as well as our principal who gave me the golden
opportunity to do this wonderful project in Computer,
which also helped me in doing a lot of programming. I
came to know about many new things.

This project couldn’t have been satisfactorily completed


without the support and guidance of MY parents.

I would like to thank my parents who helped me in


gathering diverse information, collecting data and
guiding me from time to time in making this project,
despite their busy schedule. They gave me different ideas
in making this project unique.

Page 2
Q.1 Write a program in python to check a number whether it is prime or not.

Result:

Page 3
Q.2 Write a program to check a number whether it is palindrome or not.

Result

Page 4
Q.3 Write a program to calculate compound interest.

Result

Page 5
Q.4 Write a program to display ASCII code of a character and vice versa

Page 6
Q.5 Write a program to input a character and to print whether a given character is an
alphabet, digit or any other character.

Result

Page 7
Q.6 Write a program to calculate the factorial of an integer using recursion

Result

Page 8
Q.7Python Program for GCD of more than two (or array) numbers

Result

Page 9
Q.8Python program to count Even and Odd numbers in a List

Result

Page 10
Q.9Python program to count positive and negative numbers in a list

Result

Page 11
Q10.Python program to count number of vowels using sets in given string

Result

Page 12
Q.11 Python Program for simple interest

Result

Page 13
Q.12 Count the Number of matching characters in a pair of string.

Result

Page 14
Q.13 Program to print duplicates from a list of integers

Result

Page 15
Q.14 Python program to find second largest number in a list

Result

Page 16
Q.15 String slicing in Python to rotate a string

Result

Page 17
Q.16Python Dictionary to find mirror characters in a string

Result

Page 18
Q17.Permutation of a given string using inbuilt function

Result

Page 19
Q.18Swap commas and dots in a String

Result

Page 20
Q.19Program to print the pattern ‘G’

Result

Page 21
Q.20Program to print double sided stair-case pattern

Result

Page 22
Q.21Python Program for Program to Print Matrix in Z form

Result

Page 23
Q.22Python program to convert time from 12 hour to 24 hour format

Result

Page 24
Q.23 Program to Covert dollar-to-rupee

Result:

Page 25
Q.24 Program to calculate volume calculator

Result:

Page 26
Q.25 Equal char checker program

Result:

Page 27
Q.26 Cube calculator

Result:

Page 28
Q.27 Random number generator between two numbers

Result:

Page 29
Q.28 Program to check the length of two string

Result:

Page 30
Q.29 Program to calculate the nthRoot() of a number

Result:

Page 31
Q.30 A function that takes a number n and then returns a randomly generated number
having exactly n digits (not starting with zero)

Result:

Page 32
Q.31 Finding min unit digit in given range

Result:

Page 33
Q.32 Program that generates a series using a function which takes first and last values of the
series and then generates four terms that are equidistant

Result:

Page 34
Q.33 Program to remove extra space from file

Result:

Page 35
Q. 34 Travesing a file

Result:

Page 36
Q.35 Opening a file

Result:

Page 37
Q.36 Multiplication of two number using recurrsion

Result:

Page 38
Q.37 To generate hailstone sequence

The hailstone sequence starting at a positive integer n is generated by following two simple
rules.

If n is even the next number in the sequence is n/2. If n is odd, the next number in the
sequence is 3n+1. Repeating this process hailstone number is generated.

Result:

Page 39
Q.38 Program to check a happy number (A happy number is a number in which the eventual
sum of the square of the digit of the number is equal to 1)

Result:

Page 40
Q.39 Binary search in array using loop

Result:

Page 41
Q.40 Prime number checker:

Result:

Page 42
Q.41 Binary search in array using recurrsion

Result:

Page 43
Q.42 Using list comprehension to create list where comprehension should consist of the
cubes of the number 1 to 10 only if the cube is evenly divisible by 4

Result:

Page 44
Q.43 Program to print common elements in two given list

Result:

Page 45
Q.44 Creating 2D list using array

Result:

Page 46
Q.45Traditional method to insert an element

Result:

Page 47
Q.46 Linear search in array

Result:

Page 48
Q.47 Traversing a linear list

Result:

Page 49
Q.48 Queue implementation

Page 50
Page 51
Result:

Page 52
Q. 49 Stack implementation

Page 53
Result:

Page 54
Page 55
Q. 50 Binary search

Result:

Page 56
Q.51 Bubble sort:

Result:

Page 57
Q.52Insertion Sort:

Result:.

Page 58
Q53. Python program to shuffle a deck of card.

Result:

Page 59
Q54. Print all numbers between 1 to 100 which are divisible by 7 and must not be divisible by
5.

Result:

Page 60
Q55. Python program for simple interest.

Result:

Page 61
Q56. Python program for compound interest.

Result:

Page 62
Q57. Python program to check the given year is a leap year or not.

Result:

Page 63
Q58. Python program for Tower of Hanoi.

Result:

Page 64
Q59. Python program to convert Centimetre to Inches.

Result:

Page 65
Q60. Print the all uppercase and lowercase alphabets in Python.

Result:

Page 66
SQL Programs
Q61. Create a table “shop” and order by any column.

Table:

Page 67
Q62. Print the Maximum Value for article using the above created Table “shop”.

Page 68
Q63. Find the number, dealer, and price of the most expensive article using the above table
“shop”.

Page 69
Q64. Find the highest price per article using the above created table “shop”.

Page 70
Q65. For each article, find the dealer or dealers with the most expensive price using above
created table “shop”.

Page 71
Q66. Find the articles with the highest and lowest price using above created table “shop”.

Page 72
Q67. Create a table “products” having column productID,productcode,name,quantity and
price and declare productID as Primary key.

Table:

Page 73
Q68. From the above created table “products” Update/Modify the “price field”

Page 74
Q69. From the above created table “products” Delete the row where the field has entity
“pencil”.

Page 75
Q70. Write a program to illustrate the use of Inner join in MYSQL.

Table:

Page 76
Q71. Write a program to illustrate the use of Outer Join(Left join) in MYSQL using above
created table “t1,t2”.

Page 77
Q72. Write a program to illustrate the use of Outer Join(Right join) in MYSQL using above
created table “t1,t2”.

Page 78
Programs to illustrate the use of date and time .

Q73. Create a table that uses date and time function of MySQL.

Q74. From the above created table “patients” , from which select patients who have visited in
a particular range of date.

Page 79
Q75.

Page 80

Вам также может понравиться