Output File
Output File
Output:
Program:2
FIBONACCI SERIES
Output:
Program: 3
MENU DRIVEN PROGRAM TO FIND FACTORIAL AND SUM OF LIST OF NUMBERS USING
FUNCTION
Output:
Program:4
Output:
Program No: 5
LINEAR SEARCH
Output:
Program: 6
Output:
Program: 7
Output:
Program:8
READ THE CONTENT OF A FILE DATA.TXT, LINE BY LINE AND WRITE THE CONTENTS
TO ANOTHER FILE DATA1.TXT EXCEPT FOR THE LINES WHICH CONTAINS THE
LETTER "A" IN IT.
Output:
Program No: 9
Output:
Program No: 10
CREATE BINARY FILE (STUDENT.DAT) TO STORE ROLL NO, NAME AND MARKS AND THE
SEARCH THE ANY ROLL AND CHECK WHETHER IT IS PRESENT IN THE FILE.
output:
Program: 11
Output
Program: 12
CREATE A CSV FILE TO STORE THE ADDRESSBOOK WHICH CONTAINS THE DETAILS
SUCH AS NAME,MOBILENO AND EMAIL ADDRESS AND READS THE DATA AND DISPLAYS
IT.
Output:
Program: 13
Output:
Program:14
Output:
Program: 15
Output:
Program: 16
SHOW DATABASES;
(e) Write a Query to List all the tables that exists in the current database.
SHOW TABLES;
Program: 17
(b) Write a Query to display all the details of the Employees from the above table 'STU'.
SELECT * FROM STU;
(c) Write a query to Rollno, Name and Department of the students from STU table.
SELECT ROLLNO,NAME,DEPT FROM STU;
(b) Write a Query to list name of the students whose ages are between 18 to 20.
SELECT NAME FROM STU WHERE AGE BETWEEN 18 AND 20;
(c) Write a Query to display the name of the students whose name is starting with 'A'.
SELECT NAME FROM STU WHERE NAME LIKE 'A%';
(d) Write a query to list the names of those students whose name have second alphabet 'n' in their names.
SELECT NAME FROM STU WHERE NAME LIKE '_N%';
Program: 19
b) Write a Query to change the fess of Student to 170 whose Roll number is 1, if the existing fess is less than
130.
UPDATE STU SET FEES=170 WHERE ROLLNO=1 AND FEES<130;
(c) Write a Query to add a new column Area of type varchar in table STU.
ALTER TABLE STU ADD AREA VARCHAR(20);
(d) Write a Query to Display Name of all students whose Area Contains NULL.
SELECT NAME FROM STU WHERE AREA IS NULL;
(e) Write a Query to delete Area Column from the table STU.
ALTER TABLE STU DROP AREA;
(a) To Display the average price of all the Uniform of Raymond Company from table COST.
SELECT AVG(PRICE) FROM COST WHERE COMPANY='RAYMOND';
(b) To display details of all the Uniform in the Uniform table in descending order of Stock date.
SELECT * FROM UNIFORM ORDER BY STOCKDATE DESC;
(d) To display the company where the number of uniforms size is more than 2.
SELECT COMPANY, COUNT(*) FROM COST GROUP BY COMPANY HAVING COUNT(*)>2;
(e) To display the Ucode, Uname, Ucolor, Size and Company of tables uniform and cost.
SELECT U.UCODE,UNAME,UCOLOR,SIZE,COMPANY FROM UNIFORM U,COST C WHERE
U.UCODE=C.UCODE;
Program:21
CREATE SCHOOL DATABASE, CREATE TABLE AND INSERT 3 RECORDS USING PYTHON-
SQL INTERCONNECTIVITY.
Output:
Program: 22
Output:
Program:23
Output:
Program: 24
Output: