Thursday, March 4, 2021

Informatics Practices Practical File for class 12

 


 

1. WAP in Python to plot a quadratic equation using dashed Line Chart.

Equation is 0.5*x**2+1


2. WAP in Python to plot frequency of marks using Line Chart

Marks=[50,40,50,65,65,75,75,80,80,90,90,90]


3. WAP in Python to compare the sugar levels among men and women in a city using histogram.

Men:[113,85,90,150,149,88,93,115,135,80,77,82,129]

Women:[67,98,120,133,150,84,69,89,79,120,112,100]

bins:[80,100,125,150]


4. Write a Python Program to plot two or more lines with legends, different width, color, marker and style.


5. WAP in Python to create a bar chart by using multiple x values on the same chart for men and women.

men:(22,30,35,35,26)

women:(25,32,30,35,29)


6. Create a Series using dictionary.


7. Create a data frame using dictionary.


8. WAP in Python to sort the pandas DataFrame on the basis of a single column in ascending order.


9. Create a Series and access the top 2 and last 2 elements using head() and tail() methods.


10. WAP to perform mathematical operation addition, subtraction and multiplication on two series.


11. First 10 terms of Fibonacci series are stored in a list namely fib:

 

fib = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34]

 

Write a program to plot Fibonacci terms and their square-roots with two separate lines on the same plot.

(a)    Series should be plotted as a cyan line with ‘o’ markers having size as 5 and edge-color as red.

(b)   The square-root series should be plotted as a black line with ‘+’ markers having size as 7 and edge-color as red.


12.   Given a series nfib that contains reversed Fibonacci numbers with Fibonacci numbers as show below:

[0, -1, -1, -2, -3, -5, -8, -13, -21, -34, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34]

 

Write a program to plot nfib with following specifications:

 

(a)    The line color should be magenta

(b)   The marker edge color should be black with size 5

(c)    Grid should be displayed

13. Create a bar chart which display the types of medals (Gold, Silver, Bronze, Total) on x axis and number of medals won by India with different bar width and different color.


14. WAP to show indexes and axes of a DataFrame.


15. WAP to represent size and shape of the  DataFrame.


16. WAP to transpose the values of index and columns in a DataFrame.


17. WAP in Python to create a DataFrame to store weight, age and names of 3 people. Print the DataFrame and its transpose.

18. Consider the saleDf shown below.

 

Target

Sales

ZoneA

56000

58000

ZoneB

70000

68000

ZoneC

75000

78000

ZoneD

60000

61000

Write a program to rename indexes of ZoneC and ZoneD as Central and Dakshin respectively and the column names Target and Sales as Targeted and Achieved respectively.

19. WAP in Python to create a the following DataFrame –

 

Population

Hospitals

Schools

Delhi

10927986.0

189.0

7916.0

Mumbai

12691836.0

208.0

8508.0

Kolkata

46192.0

149

7226.0

Chennai

4328063.0

157

7617.0

Banglore

5678097.0

1200.0

1200.0

Create another DataFrame from the above DataFrame which not contains column ‘Population’ and raw Banglore.

20. Consider the following DataFrame saleDf

 

Target

Sales

ZoneA

56000

58000

ZoneB

70000

68000

ZoneC

75000

78000

ZoneD

60000

61000

WAP a program to add a column namely Orders having values 6000, 6700, 6200 and 6000 respectively for the zones A, B, C and D. The program should also add a new row for a new zone ZoneE. Add some dummy values in this row.

21. WAP to  create a DataFrame to store weight, age and names of 3 people. Print the DataFrame and its transpose.

22. Consider the DataFrame (dfmks) given below.

 

A

B

C

D

Acct

99

94.0

92

97.0

Eco

90

94.0

92

97.0

Eng

95

89.0

91

89.0

IP

94

NaN

99

95.0

Math

97

100.0

99

NaN

WAP to print the maximum marks scored in each subject across all sections.

23. Consider the DataFrame (dfmks) given below.

 

A

B

C

D

Acct

99

94.0

92

97.0

Eco

90

94.0

92

97.0

Eng

95

89.0

91

89.0

IP

94

NaN

99

95.0

Math

97

100.0

99

NaN

WAP to print the maximum marks scored in a section, across all subjects.

24. WAP to calculate mode for each subject in DataFrame dfmks1.

25. WAP to calculate median and mean for each subject in DataFrame dfmks1.

 

 

 

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 andtruncate command with example.

4.       Write the sort notes on group by, having andwhere 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 ofhighest and lowest salary of each department having maximum salary greater than4000.

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’.


Informatics Practices Sample Paper for class 12

 


 1. Informatics Practices Sample Paper - 1


 2. Informatics Practices Sample Paper - 1 Solution


 3. Informatics Practices Sample Paper - 2


 4. Informatics Practices Sample Paper - 2 Solution 


Informatics Practices Syllabus Class 11 and 12

 


1. 2021 - 2022 Syllabus

2. 2020 - 2021 Syllabus

3. 2019 - 2020 Syllabus




Python Game Projects File for class 12 CS and IP

 

Python Game Projects File for class 12 CS 



Game No.  1: Snake Game in Python:

Game No. 2: SPACE INVADERS Game in Python

Game No. 3: Flappy Birds Game in Python

Game No. 4: Tic Tac Toe Game in Python

Game No. 5: Ping Pong Game in Python


List of Python with CS practical for class 12

  


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’

6)     WAP in Python to read a text fileand print the number of uppercase and lowercase letters in the file.

7)     WAP in Python to create a binaryfile with name and roll number of the students. Search for a given roll numberand display the name of student.

8)     Create a binary file with roll_no,name and marks of some students and update the marks of specific student.

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.

14)  Write a menu driven program which insert, delete and display the details of an employee such as eid, ename and salary using Stack.

15)  Write a menu driven program which insert, delete and display the details of a book such as book_id, book_name and price using Stack.

16)  Write a menu driven program which insert, delete and display the details of a student such as roll_no, sname and course using Stack.

17)  Write a menu driven program which insert, delete and display the details of a movie such as movie_id, mname and rating using Stack.

18)  Write a menu driven program which insert, delete and display the details of a product such as pid, pname and price using Stack.

19)  Write a menu driven program which insert, delete and display the details of a club such as club_id, cname and city using Stack.

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 andtruncate command with example.

4.       Write the sort notes on group by, having andwhere clause with example.

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 ofhighest and lowest salary of each department having maximum salary greater than4000.

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’.