List of Python with CS practical for class 12
Part – 1 Python with CS
1) WAP in Python to find the factorial of a number using function.
2) WAP in Python to implement default and positional parameters.
3) Write a program in Python to input the value of x and n and print the sum of the following series
1+x+x^2+x^3+ ----------------x^n
4) WAP in Python to read a text file and print the number of vowels and consonants in the file.
5) WAP in Python to read a text file and print the line or paragraph starting with the letter ‘S’
9) Create a binary file with eid, ename and salary and update the salary of the employee.
10) Create a text file and remove the lines from the file which contains letter ‘K’
11) Create a binary file with 10 random numbers from 1 to 40 and print those numbers.
12) Write a program in Python to create a CSV file with the details of 5 students.
13) WAP in Python to read a CSV file.
20) Write a menu driven program to demonstrate add, display, update, delete and exit. Performed on a table Book containing (bid, bname, bprice) through python-MySql connectivity.
21) Write a menu driven program to demonstrate add, display, update, delete and exit. Performed on a table Product containing (pid, pname, price) through python-MySql connectivity.
22) Write a menu driven program to demonstrate add, display, update, delete and exit. Performed on a table club containing (club_id, cname, city) through python-MySql connectivity.
23) Write a menu driven program to demonstrate add, display, update, delete and exit. Performed on a table student containing (sid, sname, course) through python-MySql connectivity.
24) Write a menu driven program to demonstrate add, display, update, delete and exit. Performed on a table movie containing (mid, mname, rating) through python-MySql connectivity.
25) Write a menu driven program to demonstrate add, display, update, delete and exit. Performed on a table Employee containing (eid, ename, salary) through python-MySql connectivity.
Part – 2 MYSQL
SQL Practical
1. Shiva, a student of class XII, created a table “CLASS”. Grade is one of the columns of this table. Write the SQL query to find the details of students whose grade have not been entered.
2. Shiva is using a table with the following details:
Students(Name, Class, Stream_id, Stream_Name)
Write the SQL query to display the names of students who have not been assigned any stream or have been assigned Stream_Name that end with “computers”
3. Write the difference between drop, delete and truncate command with example.
4. Write the sort notes on group by, having and where clause with example.
5. Write the SQL query to find out the square root of 26.
6. Shiva is using a table employee. It hasfollowing details: Employee(Code, Name, Salary, DeptCode). Write the SQL queryto display maximum salary department wise.
7. Write the SQL Query to display the difference of highest and lowest salary of each department having maximum salary greater than 4000.
8. Write the SQL Query to increase 20% salary ofthe employee whose experience is more than 5 year of the table Emp(id, name, salary,exp)
9. Write the SQL Query for inner join of two tables Emp(eid, ename,salary,dept_id) and Dept(dept_id, dname)
10. Write the SQL Query for full outer join of two tables Emp(eid, ename,salary,dept_id) and Dept(dept_id, dname)
11. Write a SQL to Enter 5 Employee data in a single query in the table Emp (eid, ename, salary, city, dob).
12. Display 4 characters extracted from 5th right character onwards from string ‘ABCDEFG’.
13. Write a query to create a string from the ASCII values 65, 67.3, ‘68.3’
14. Display names ‘MR. MODI’ and ‘MR. Sharma’ into lowercase.
15. How many characters are there in string ‘CANDIDE’.
No comments:
Post a Comment