Page 1 :
Practical File, Computer Science, (Python), , Name:, Class:, School:, Roll No:
Page 2 :
Index, No. Name of Practical, WAP to compute x n of given two integers x, and n., 2., WAP for calculating simple interest., 3., WAP to accept a number from the user and, display whether it is an even number or odd, number., 4., WAP to accept percentage of a student and, display its grade accordingly., 5., WAP to print Fibonacci series up to certain, limit., 6., WAP to display prime numbers up to a certain, limit., 7.WAP to accept a number, find and display whether, it’s a Armstrong number or not., 1., , 8., 9., 10., , 11, 12., , 13., , 14., , WAP to accept a number and find out whether, it is a perfect number or not., WAP to print the sum of the series, 1+x1/1!+x2/2!+…….xn/(n)!- exponential series., WAP to print the following pattern:, 1, 12, 123, WAP to accept a string and display whether it, is a palindrome., WAP that counts the number of alphabets and, digits, uppercase letters, lowercase letter,, spaces and other characters in the string, entered., WAP to accept a string ( a sentence) and, returns a string having first letter of each word, in capital letter., WAP to remove all odd numbers from the given, , Date, , Page, no., , Sign of, the, Teacher
Page 3 :
15., , list., WAP to display second largest element of a given, list., , 16., , WAP to display cumulative elements of a given, list., , 17., , WAP to display frequencies of all the elements of, a list., , 18., , WAP in Python to display those strings which are, string with ‘A’ of given list., , 19., , WAP in Python to find and display the sum of, all the values which are ending with 3 from a, list., WAP to shift the negative number to left and, the positive numbers to right., , 20., , 21., 22., , WAP to swap the content with next value, divisible by 7., WAP to accept values from user and create a, tuple., , 23., , Write a program to input total number of, sections and stream name in 11th class and, display all information on the output screen., , 24., , Write a Python program to input names of ‘n’, countries and their capital and currency, store it, in a dictionary and display in tabular form. Also, search and display for a particular country., SQL, 25 Queries
Page 4 :
Program -1 WAP to compute x n of given two integers x and n., Code:, , ********Output of the program********
Page 5 :
Program 2: WAP for calculating simple interest., Code:, , ********Output of the program********
Page 6 :
Program 3: WAP to accept a number from the user and display whether, it is an even number or odd number., Code:, , ********Output of the program********
Page 7 :
Program 4: WAP to accept percentage of a student and display its grade, accordingly., Code:, , ********Output of the program********
Page 8 :
Program 5: WAP to print Fibonacci series up to certain limit., Code:, , ********Output of the program********
Page 9 :
Program 6: WAP to display prime numbers up to a certain limit., Code:, , ********Output of the program********
Page 10 :
Program 7: WAP to accept a number, find and display whether it’s a, Armstrong number or not., Code:, , ********Output of the program********
Page 11 :
Program 8: WAP to accept a number and find out whether it is a perfect, number or not., Code:, , ********Output of the program********
Page 12 :
Program, , 9:, WAP, to, print, the, sum, of, the, 1+x1/1!+x2/2!+…….xn/(n)!- exponential series., , Code:, , ********Output of the program********, , series
Page 13 :
Program 10: WAP to print the following pattern:, 1, 12, 123, Code:, , ********Output of the program********
Page 14 :
Program 11: WAP to accept a string and display whether it is a, palindrome., Code:, , ********Output of the program********
Page 15 :
Program 12-WAP that counts the number of alphabets and digits,, uppercase letters, lowercase letter, spaces and other characters in the, string entered., Code:, , ********Output of the program********
Page 16 :
Program 13 WAP to accept a string ( a sentence) and returns a string, having first letter of each word in capital letter., Code:, , ********Output of the program********
Page 17 :
Program 14 -WAP to remove all odd numbers from the given list., Code:, , ********Output of the program********
Page 18 :
Program 15 WAP to display second largest element of a given list., Code:, , ********Output of the program********
Page 19 :
Program 16 WAP to display cumulative elements of a given list., For eg. List is [10,20,30,40], output should be [10, 30, 60, 100], Code:, , ********Output of the program********
Page 20 :
Program 17 -WAP to display frequencies of all the elements of a list., Code:, , ********Output of the program********
Page 21 :
Program 18 - WAP in Python to display those strings which are string, with ‘A’ of given list., Code:, , ********Output of the program********
Page 22 :
Program 19 - WAP in Python to find and display the sum of all the, values which are ending with 3 from a list., Code:, , ********Output of the program********
Page 23 :
Program 20 - WAP to shift the negative number to left and the positive, numbers to right so that the resultant list will look like., Original list [-12, 11, -13, -5, 6, -7, 5, -3, -6], Output should be [11, 6, 5, -6, -3, -7, -5, -13, -12], Code:, , ********Output of the program********
Page 24 :
Program 21- A list Num contains the following elements:, 3, 21, 5, 6, 14, 8, 14, 3, WAP to swap the content with next value divisible by 7 so that the resultant, array will look like:, 3, 5, 21, 6, 8, 14, 3, 14, Code:, , ********Output of the program********
Page 25 :
Program 22-WAP to accept values from user and create a tuple., Code:, , ********Output of the program********
Page 26 :
Program 23- Write a program to input total number of sections and stream name, in 11th class and display all information on the output screen., Code:, , ********Output of the program********
Page 27 :
Program 24- Write a Python program to input names of ‘n’ countries and their, capital and currency, store it in a dictionary and display in tabular form. Also search, and display for a particular country., Code:
Page 28 :
********Output of the program********, , Country, , Capital, , Austria, India, France, , Vienna, New Delhi, Paris, , Country, , Capital, , India, , New Delhi, , Currency, Euro, Indian Rupee, Euro, Currency, Indian Rupee
Page 30 :
. Command for creating a database., , 2. Command for using the database., , 3. Command for creating a table., , 4. Command for showing the structure of table., , 5. Command to show tables present in database.
Page 31 :
6. Command for inserting data into a table., , 7. Command to view the contents of the table., , 8. Command to retrieve data.
Page 32 :
9. Command for using keyword DISTINCT., , 10. Command for using WHERE clause., , 11. Command for using ORDER BY clause., , 12. Command for using UPDATE .
Page 33 :
13. Command for using ALTER (to modify structure of table)., , 14. Command for using LIKE operator., , 15. Command for using aggregate functions., , 16. Command for using GROUP BY.
Page 34 :
17. Command for using HAVING clause., , 18. Command for using Group by with order by., , 19. Command for using group by and having clause with where clause.
Page 35 :
20. Command for equi-join of tables., , 21. Command to retrieve data from two tables., , 22. Command for using group by clause in join.
Page 36 :
23. Command for using group by and order by clause in equi-join., , 24. Command for using where clause and group by., , 25. Command for adding primary key., , 26. Command to delete a column., , 27. Command to remove primary key.
Page 37 :
28. Command to increase marks., , 29. Command to change data type of an existing column., , 30. Command to a delete table.