Skip to main content

GRADE XII CS - VIVA QUESTIONS

 

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

GRADE XII - Python Connectivity with MySQL

  Python Connectivity with MySQL In real-life applications, the data inputted by the user and processed by the application needs to be saved permanently, so that it can be used for future manipulation. Usually, input and output data is displayed during execution but not stored, as it resides in main memory , which is temporary — i.e., it gets erased once the application is closed. This limitation can be overcome by sending the data to be stored in a database , which is made accessible to the user through a Front-End interface . Key Concepts Database A database is an organized collection of data that is stored and accessed electronically from a computer system. DBMS (Database Management System) A DBMS is software that interacts with end-users, applications, and the database to capture and analyze data. Front-End The Front-End is the user interface of the application, responsible for input/output interaction with the user. Back-End The Back-End refe...

GRADE XII - CSV FILE

CSV FILE (COMMA SEPERATED VALUE) CSV NOTES LINK :  CSV NOTES - CLICK HERE Writing data to a CSV file involves the following steps: Import the csv module Open the CSV file in write mode ( "w" ) using open() Create the writer object Write the data into the file using the writer object Close the file using close() writerow() Method This method is used to write a single row to a CSV file. It takes a sequence (list or tuple) as its parameter, and writes the items as a comma-separated line in the file. You do not need to add a newline character (\n) — it automatically places the end-of-line marker.     EXAMPLE 1: import csv  # Importing the csv module # CSV file opened using relative path csv_fobj = open("emp.csv", "w")   # Writer object created wtr_obj = csv.writer(csv_fobj) # Record with field heading is written wtr_obj.writerow(["Empno", "Name", "Salary"]) # Records with data are...