Program Practical
Program Practical
Code:-
Output:
Q): Write a program to check weather the number is armstrong
number or not.
Code:-
Output:-
Q): write program to convert temp to ferhenite & Celcius.
Code:-
Output:-
Q): Write program to print half pyramid pattern.
Code :-
Output:-
Q): Write python program for adding two lists in python.
Code:-
Output:-
Text inside “test1”:-
Output:-
Output:-
Q): Write a program to read entire content of a text file along with
frequency of letter “a” in it.
Code :-
Output :-
Q): Write to read entire content of a text file along with frequency of
vowels in it.
Code:-
Output:-
Q): Write a program to read first 1 line at a time from a text file.
Code:-
Output:-
Q): Write a program using readline function to read all lines from a file
one by one.
Code:-
Output:-
Q): Write a program using readline function to read a file line by line &
count how many lines are beginning with letter w also print them.
Code:-
Output:-
Q): Write a python program to create a table batsman in test named
database.
Code:-
Output:-
Q): Write a python program to insert into the table batsman.
Code:-
Output:-
Q): write a python program to delete data from the table
batsman.
Code:-
Output:-
Q): write a python program to display all records of the table
batsman.
Code:-
Output:-
Q): Write a program to find a record in the table batsman.
Code:-
Output:-
Q): Write a program to update age in the table batsman.
Code:-
Output:-
Q): Write a program to count records in the table batsman.
Code:-
Output:-
STUDENT
i. To display the records from table student in alphabetical order as per the name
Student.
ii. To display class dob and city whose marks is between 450 and 551.
Command : select name,class,dob,ciy from student where marks between 450 and 5
iii. To display name,class and total number of student who has scored more than 450
marksclasswise.
name .
transaction.
(ii) To display the cno and amount of all transactions done in the month of September
2017from the transaction.
like”2017-09%”;
(iii) To display the last date of transaction(dot) from the table transaction for
thecustomer having cno as 103.
cno=103;
(iv) To display the cno , number of transactions and the highest amount of
eachcustomer if the number of transactions is more then 1.
of salesman.Query-select
area;Output-
(iii) Display the average qtysold from each area where where number of salesman is more
thenone.
havingcount(sname)>1;Output-
Output-
ITEM
Output-
by type;Output-
(iii) Display the least price.
item;Output-
Output-
STATIONARY
Output-
(ii) Display itemno and itemname of those items from stationary table, whose rate is more
than15.
rate>15;Output-
(iii) To display the details of those items whose scode is 22 or qty is more than 110 from
thetable stationary.
qty>110;Output-
(iv) Display the item with its quantity which include pen in their
like”%pen%”; Output-
FAMILY
Output-
(ii) To list the name of family where female members are more
Output-
(iii) To count the number of family whose income is less then
<10000;
Output-
(iv) To display details of family where income is more than 10000 and occupation is mixed
Outpu
1- Create table persons with attributes person name, person id, city, state, age?
5-write a query in sql to show details of persons who contain e in their name.
Output>
Q): Write a python program to insert into the table
batsman .
Output>
Q): write a python program to delete data from the
table batsman.
Output>
Q): write a python program to display all records of
the table batsman.
Output>
Q): Write a program to find a record in the table
batsman.
Output>
Q): Write a program to update age in the table
batsman.
Output>
Q): Write a program to count records in the table
batsman.
Output>