Skip to main content

GRADE XII CS - REVISION

 

VIVA QUESTIONS

GRADE XII CS

Dear All

Be thorough with your project and practical files, as the viva can be asked from anywhere. Stay calm, don’t get nervous, and be confident in front of the examiner.

1. Tell me about your project.

2. Which concepts you have used for your project?

3. What do you mean by front end and back end? How they are important in developing any such projects?

4  Mention the modules and built-in functions you have used in your project.

5. Which real world problems are solved by your project?

6. Explain the most important feature of your project.

7. Name a few mutable data types of python.

Lists, Sets, and Dictionaries

8. Name a few immutable data types of python.

Strings, Tuples, Numeric

9. Name ordered and unordered data type of python.

Ordered – String, List, Tuples

Unordred – Set, Dictionaries

10. What is the significance of a pass statement in python?

pass is no operation python statement. This is used where python requires syntax but logic requires no actions.

11. What is slicing in python?

Python slicing is a statement of python that extracts a list of elements from the given sequence in the range of start and stop values with step value intervals.

12. How to check the variables stored in same object in python?

The id() function returns the memory address of python object.

13. How to remove the last element from a list?

To remove the last element from a list following ways can be used:

l.pop()

del l[-1]

14. What is the difference between append() and extend() methods?

append() is used to add an element to the list to the last.

extend() is used to add multiple elements to the list.

15. What are the needs of function in the python program?

16. What are parameters and arguments in python programs?

17. What is the local and global scope variable?

18. What are mutable and immutable arguments/parametersin a function call?

Mutable arguments/parameters values changed over the access of value and variable at runtime.

Immutable arguments/parameters whose values cannot be changed. They allocate new memory whenever the value is changed.

19. What are the different modes of opening a file?

The different modes of opening a file are as follows:

r,w,a,r+,w+,a+,rb,wb,ab,rb+,wb+,ab+

20. What is the difference between readline() and readlines() function?

readline() function reads the content of the text file and returns the content into the string whereas readlines() function reads the content of the text file and returns the content into the list.

21.Are CSV files and Text Files same?

CSV files and Text Files are same in storage but csv file stores the data separated by a delimiter.

22. What is Pickling & unpickling?

23. Name the functions used to read and write data into binary files.

pickle.dump(list_object, file_handle)

pickle.load(file_object)

24. What is the significance of tell() and seek() functions?

tell() function returns the current file position in a file

seek() function change the current file position

25. What are the operations can be performed on the stack?

Push

Pop

Peep or Peek

26. Exception handling in Python.

27. Difference between Having and where clause in MySQL / Update & Alter.

28. What is the purpose of DISTINCT clause.

29. What are wild card characters in MySQL.

30. Difference between group by and order by.
31. Revise EQUI / Natural and cross Join.

                                                     PRACTICAL QUESTIONS

1. Write a Python program to create a binary file named product.dat and perform the following operations using user-defined functions.

Each record in product.dat contains the following fields:

Product ID, Product Name, Category, Price, Stock Quantity
These records should be stored as a list object. 

Implement the following functions:
AddProductDetails() – To create and store product details in the file.
DisplayProductRecords() – To display all records and count the total number of records in the file.

2. Write a Python program to create a binary file named inventory.dat and perform the following operations using user-defined functions.

Each record in inventory.dat contains the following fields:

Product Code, Product Name, Unit Price, Stock Quantity
These records should be stored as a list object. Implement the following functions:

CreateInventory() – To create and store product details in the file.
CalculateTotalValue() – Computes the total stock value by multiplying the unit price and quantity of each product.

3.Write a Python program to implement a stack using a list. Define the following functions:

peven(stack, data) – This function takes an empty list stack and a list of numbers data. It should push only the even numbers from data onto the stack.
popst(stack) – This function removes and returns the top element of the stack on each call.
Also, write function calls to demonstrate the working of the stack.

4. Write a Python program to implement a stack using a list. Define the following functions:

peven(stack, data) – This function takes an empty list stack and a list of numbers data. It should push only the ODD numbers from data onto the stack.
popst(stack) – This function removes and returns the top element of the stack on each call.
Also, write function calls to demonstrate the working of the stack.

5. Revise CSV / Text file and Stack questions from HY and PreBoard papers.


All the best !
Kirti Hora






Comments

Popular posts from this blog

CS - SORTING/SEARCHING ALGORITHMS

  SORTING ALGORITHMS                       SORTING ALGORITHM PDF LINK #Bubble Sort          ·        The outer loop iterates through the entire array. ·        The inner loop compares adjacent elements and swaps them if they are out of order. ·        The outer loop runs n times, and each pass moves the largest element to its correct position. arr=[3,8,5,2,1] n = len(arr) print(n) for i in range(n):  #traverse through all the elements         # Last i elements are already sorted, no need to check them         for j in range(0, n-i-1):              # Swap if the element found is greater than the next element              if arr[j] > arr[j+1]:               ...

GRADE XI - NESTED FOR LOOP

                                                         NESTED FOR LOOP 1. for var1 in range(3):      print(var1,"OUTER LOOP")          # 0 outer loop       1 outer loop      2 outer loop          for var2 in range(2):                  print(var2+1,"INNER LOOP")    #1  2 inner loop     1  2  inner loop   1 2 inner loop  2. Print the following pattern using for loop: 1  1 2  1 2 3  1 2 3 4  Sol: for r in range(1,5):   #ROWS     for c in range(1,r+1):   #COLUMNS         print(c,end=" ")     print() 3. Print the following pattern using for loop: @  @ @  @ @ @...