0% found this document useful (0 votes)
7 views

Pratical file 12th pdf

Uploaded by

ikea.gorakhpur
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)
7 views

Pratical file 12th pdf

Uploaded by

ikea.gorakhpur
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/ 31

PROGRAM NO.

:- 1

 Objective:- To calculate square root & cube root of entered


number by user.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 2

 Objective:- To find the smallest & greatest among 3 number


entered by user.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 3

 Objective:- To perform some operation on 2 number and


operators entered by user.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 4

 Objective:- To create Si() function & calculate simple interest.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 5

 Objective:- To check if the entered year is leap year or not.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 6

 Objective:- To print the table of number entered by user.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 7

Objective:- To check if the entered number is perfect number


or not.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 8

Objective:- To check if the entered number is prime number or


not.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 9

 Objective:- To print the factorial value of the entered number


by the user.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 10

 Objective:- To check if the entered number is Armstrong or not.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 11

Objective:- To print the “*’’ pattern.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 12

Objective:- To print the Fibonacci series & number of terms


entered by user.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 13

Objective:- To remove all the odd number from the given list.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 14
Objective:- To count the number of alphabet,digits,uppercase,
lowercase,space and other characters entered in
string by user.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 15

Objective:- To maintain the book details using stacks data


structure.

CODE OF PROGRAM
OUTPUT OF PROGRAM
PROGRAM NO.:- 16

Objective:- To read a file “data.txt” & print total number of


alphabets in the file.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 17

Objective:- To copy the entire content from file “data.txt” to


“story.txt”.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 18

Objective:- To display the longest word from file “data.txt”.

CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 19
Objective:- To read a file named “data.txt” , count and print the
following:-
i) Length of the file.
ii) Total uppercase alphabets.
iii) Total digits.
iv) Total lowercase alphabets.
CODE OF PROGRAM

OUTPUT OF PROGRAM
PROGRAM NO.:- 20

Objective:- To insert data in table using python, mysql interface.

CODE OF PROGRAM

OUTPUT OF PROGRAM
25
my SQL
Queries
 Command for creating database:-

 Command for using database:-

 Command for creating table:-

 Command to display structure of table:-


 Command to show tables in database:-

 Command to insert data in table:-

 Command to display all content of table:-


 Command to display selected content of table:-

 Command using DISTINCT keyword:-

 Command using WHERE clause:-


 Command using ORDER BY clause:-

 Command using UPDATE keyword:-

 Command using ALTER keyword:-


 Command using LIKE operator:-

 Command using AGGREGATE function:-


 Command using GROUP BY keyword:-

 Command using HAVING clause:-

 Command using GROUP BY with ORDER BY:-


 Command using GROUP BY and HAVING clause with
WHERE clause:-

 Command using JOIN clause:-


 Command to accessing data from two table:-

 Command using GROUP BY clause in JOIN:-


 Command to add primary key:-

 Command using DELETE clause:-

 Command using DROP clause:-

You might also like