Thursday, April 14, 2022

CBSE Practical Exam

CBSE PRACTICAL EXAM

CBSE Practical Exam (083/065)- CS/IP

Practical exam is an important part of Computer Science(083)/Informatics practices(065) subject. From weightage prespectice, it hold 30 percent of total marks in CS/IP. Both CS/IP is a practical dominated subject i.e. if one is good in practical then they are in general good in the theory.

so in this article we will talk about CBSE practical exam and its components in general:

Parts of practical Exam:

  1. Pen-Paper Test
  2. Practical File
  3. Project Work
  4. Viva

The practical exam is conducted in presence of Internal Examiner(Venue School Subject Teacher), External Examiner(Subject Teacher form another school Appointed by CBSE) and an Observer(Also Appointed by CBSE).

We have article dedicated to Practical File and Project Work, Hence in this article we will only discuss Pen-Paper Test and Viva.

Pen-Paper Test:

Students during practical exam have to solve the question(coding based) on the computer and then note it down in their CBSE practical answersheet.Usually 3 hrs is given pen-paper test
The following points have to be included while answer:

  1. Question
  2. Program or Query
  3. Input/Output(if any)
  4. Documentation

Question:The question will be coding based, be it python, mysql or any other programming language. The question can SET based, randomly allocated by chit pull method. Based on the marks allocated by CBSE, one may have to attempt 3 or 4 questions. Usually it is a good practice to write the full question along with the question number in the answer script.

Program or Query:Based on the question framed in the question paper, the student needs to solve the same on the computer first, get the expected output after providing required input(if any). Once the program is constructed succesfully, it has to be properly noted down in the answer script.

Input/Output:If the program/Query takes any input value from the user then it must be noted down in the answer script. Also if the program/query generates any output, it has to noted down in the answer scripts as well.

Documentation:Documentation is a small explanation about the program, various constructs used eg loops, conditionals etc and also about the modules, functions used in the program to get the desired output from the data. It can be 4 to 5 lines long.

Example:

Question: Write a program to count the number of upper-case alphabet present in an text file ‘article,txt’.

Program:

In [ ]:
#Writing to the file
f=open("article.txt",'w')
st="An SQL JOIN clause is used to combine rows from two or more tables based on a common field between them. While querying for a join, more than one table is considered in FROM clause."
f.write(st)
f.close()

#reading from the file and counting it
f=open("article.txt",'r')
pr=f.read()
cnup=0
cnlo=0
for i in pr:
    if i.isupper():
        cnup+=1
    elif i.islower():
        cnlo+=1
f.close()
print("The number of uppercase alphabets: ",cnup)
print("The number of lowercase alphabets: ",cnlo)

Input: In this program, the text file i.e. article.txt is the input to the program and nothing else

Output:
The number of uppercase alphabets: 13
The number of lowercase alphabets: 131

Documentation:This program is used to load and process a text file. In this program we have used open() function to load and open the file in read mode. With this program we have counted the number of Uppercase letter and Lowercase letter. We have used isupper and islower function to check if the alphabet is lower case or upper case. We have also used a for loop to get access to each alphabet.

Practical File: The details about practical file can be found using this link(Click Here)

Project Work: The details about project work can be found using this link(Click Here)

Viva: In the viva question will be asked by the external examiner(appointed by CBSE). The questions will be asked from the syllabus but there is not set domain for the questions to be asked. It is a good idea to prepare questions from project and practical i.e. one should be aware of their practical and project work so that if questions are asked from that, the students will be able to answer. One should study the fundamentals of python as well.

Share:

Thursday, April 7, 2022

Python Revision - Question

python fundamentals

Revision on Python Basics - Assignment, Practical work, CBSE question

Topics of importance:
1.Operator precedence
2.For loop
3.While loop
4.If condition
5.Keywords
6.Strings
7.List
8.Tuple
9.Dictionary
10.Jump statement

Practical Question(To be done at the school LAB And to be Written in the PRACTICAL NOTE BOOK)

Q1. Write a program to input Two number form the user and perform the basic arithmetic operation(I.e Addition,Subtraction, multiplication, modulo, floor division and exponent ), display their result to the user

Q2. Generate a four arithmetic operation calculator(I.e +,-,*,/) that can take one operator and two operands, display the result of the operation to the user

Q3. Calculate the factorial of a number using while loop

Q4. Write a python program to input a list and find the maximum, minimum and mean value of the list

Q5. Write a python program to input a string and count the numbers of vowels in the string.

Q6. Write a python program to combine two dictionary adding values for common keys
Input:
d1={‘a’:100, ’b’:200, ’c’:300}
d2={‘a’:300, ‘b’:200, ‘d’:400}
Output should be: {‘a’:400, ‘b’:400, ‘c’:300, ‘d’:400}

Q5. Write a Python program to count the number of characters (character frequency) in a string. Sample String : google.com' Expected Result : {'g': 2, 'o': 3, 'l': 1, 'e': 1, '.': 1, 'c': 1, 'm': 1}

Q6. Write a Python program to count the occurrences of each word in a given sentence.

Q7. Write a Python program to remove duplicate words from a given string.
Sample Output:
Original String:
Python Exercises Practice Solution Exercises
After removing duplicate words from the said string:
Python Exercises Practice Solution

Q8. Write a Python program to get the largest and smallest number from a list.

Q9. Write a Python program to print a specified list after removing the 0th, 4th and 5th elements.
Sample List : ['Red', 'Green', 'White', 'Black', 'Pink', 'Yellow']
Expected Output : ['Green', 'White', 'Black']

Q10. Write a Python program access the index of a list.

Q11. Write a Python program to get the frequency of the elements in a list.

Q12. Write a Python program to change the position of every n-th value with the (n+1)th in a list.
Sample list: [0,1,2,3,4,5]
Expected Output: [1, 0, 3, 2, 5, 4]

Q13. Write a Python script to sort (ascending and descending) a dictionary by value.

Q14. Write a Python script to add a key to a dictionary.
Sample Dictionary : {0: 10, 1: 20}
Expected Result : {0: 10, 1: 20, 2: 30}

Q 15. Write a Python script to check whether a given key already exists in a dictionary.

Q16. Write a Python program to iterate over dictionaries using for loops.

Q17. Write a Python program to remove duplicates from Dictionary.

Q18. Write a Python program to count the frequency in a given dictionary.
Original Dictionary:
{'V': 10, 'VI': 10, 'VII': 40, 'VIII': 20, 'IX': 70, 'X': 80, 'XI': 40, 'XII': 20}
Count the frequency of the said dictionary:
Counter({10: 2, 40: 2, 20: 2, 70: 1, 80: 1})

Q19. Write a Python program to unpack a tuple in several variables.

Q20. Write a Python program to find the repeated items of a tuple.

Q21. Write a Python program to convert a tuple to a dictionary.

Q22. Write a Python program to remove an empty tuple(s) from a list of tuples.
Sample data: [(), (), ('',), ('a', 'b'), ('a', 'b', 'c'), ('d')]
Expected output: [('',), ('a', 'b'), ('a', 'b', 'c'), 'd']

Q23. Write a Python program calculate the product, multiplying all the numbers of a given tuple.
Original Tuple:
(4, 3, 2, 2, -1, 18)
Product - multiplying all the numbers of the said tuple: -864
Original Tuple:
(2, 4, 8, 8, 3, 2, 9)
Product - multiplying all the numbers of the said tuple: 27648

Q24. Write a Python program to calculate the average value of the numbers in a given tuple of tuples.

Original Tuple:
((10, 10, 10, 12), (30, 45, 56, 45), (81, 80, 39, 32), (1, 2, 3, 4))
Average value of the numbers of the said tuple of tuples:
[30.5, 34.25, 27.0, 23.25]

Original Tuple:
((1, 1, -5), (30, -15, 56), (81, -60, -39), (-10, 2, 3))
Average value of the numbers of the said tuple of tuples:
[25.5, -18.0, 3.75]

Q25. Write a python program to terminate a loop on a list of name when the 'guru' name is encountered for the first time.
sample list:
['Siya', 'Tiya', 'Guru', 'Daksh', 'Riya', 'Guru']

output:
Siya
Tiya
Guru
Loop terminated

Q26. Write a python program that traverese over a list of name and prints all the names except "Daksh".
Sample List:
['Siya', 'Tiya', 'Guru', 'Daksh', 'Riya', 'Guru']
Output:
['Siya', 'Tiya', 'Guru', 'Riya', 'Guru']

Q27. Write a python program to demonstrate the usage of "pass" keyword in conditional statement and loops.

Assignment Question(To be done as Homework)

Q1. Write a python program to input a string form the user and count the number of Uppercase and lower case letter in the string.

Q2. Write a program to store students information like admission number, roll number, name and marks in a dictionary and display information on the basis of admission number.

Q3. Write a python program to remove the duplicate from a user input list.

Q4. Write a python program to count the frequency(I.e number of occurrence) of elements in the list.

Q5. Differentiate between mutable and immutable data types

Q6. Write a program to capitalize the first and last letter of each word in a string. The string should be taken as input.

Q7. Write a python program to sort a dictionary by key value

CBSE Question

Q1. Out of the following, find those identifiers, which cannot be used for naming Variables or Function in a Python programming:
Price*Oty,class,For,do,4thCol, totally, Row31, _Amount      

Q2. Find the invalid identifier from the following:
a)MyName
b)True
c)2ndName
d)My_Name

Q3. Identify the valid identifier from the following:
a) ?
b) <
c) **
d) and

Q4. Which of the following are valid operators in python:
a)*
b)
/
c)like
d)||
e)is
f)^
g)between
h)in

Q5.
a) What are data types? How are they important?
b) Write the names of any four data types available in python.

Q6. Rewrite the following code in python after removing all syntax error(s).Underline each correction done in the code:

In [ ]:
30=To
for K in range(0,To)
    IF k%4==0:
        print(K*4)
    Else:
        print(K+3)

Q7. Write the output of the following Python code:
 for i in range(2,7,2):
  print(i*'$')

In [ ]:
 
Share: