The document contains a comprehensive list of sample viva questions and answers related to Python programming, data structures like numpy arrays and Pandas, SQL commands, and networking concepts. It covers topics such as the benefits of Python, differences between data types, and various database operations. Additionally, it includes frequently asked questions and previous years' viva questions for further practice.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
11 views6 pages
Sample Viva Questions
The document contains a comprehensive list of sample viva questions and answers related to Python programming, data structures like numpy arrays and Pandas, SQL commands, and networking concepts. It covers topics such as the benefits of Python, differences between data types, and various database operations. Additionally, it includes frequently asked questions and previous years' viva questions for further practice.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6
SAMPLE VIVA QUESTIONS
1. What is Python? What are the benefits of using Python?
Ans. Python is a programming language with objects, modules, threads, exceptions and automatic memory management. The benefits of Python are that it is simple and easy, portable, extensible, built-in data structure and is open source. 2. What are numpy arrays? Ans. A numpy array is a table of elements, all of the same type, indexed by a list/tuple of integers. Numpy arrays are also called ndarrays. 3. Why are numpy arrays used over lists? Ans. Numpy arrays have contiguous memory allocation. Thus, a same array stored as list will require more space as compared to arrays. • They are work faster and, hence, are more efficient than lists. • They are more convenient to deal with. 4. What do you understand by Array slicing? Ans. Array slicing refers to the process of extracting a subset of elements from an existing array and retuning the result as another array, possibly in a different dimension from the original. 5. Is Python numpy better than lists? Ans. Yes, numpy array are better than the lists. We use Python numpy array instead of a list because of the following three reasons: (a) Less Memory (b) Fast (c) Convenient 6. What is Pandas Series? Ans. Series is a one-dimensional labelled data structure capable of holding data of any type (integer, string, float, Python objects, etc.) accessed using respective data labels, called its index. 7. Who created python? Who is the main author of Pandas? Ans. Creator – Guido van Rossum. Author - Wes McKinney. 8. What is dataframe? Ans. Dataframe is a two-dimensional data structure with heterogeneous data, usually represented in tabular format. The data is represented in rows and columns. Each column represents an attribute and each row represents a record. Features of dataframe are: • Potentially, columns are of different types. • Size is mutable. • Labelled axes (rows and columns). • Can perform arithmetic operations on rows and columns. 9. Which is the standard data missing marker used in Pandas? Ans. NaN 10. Why is the return keyword used in Python? Ans. The purpose of a function is to receive the inputs and return some output. The return is a Python statement which we can use in a function for sending a value back to its calling function or the operating system. 11. What do you understand by Python modules? Ans. A file containing Python definitions and statements is called a Python module. So naturally, the filename is the module name which is appended with the suffix .py. 12.What is the difference between del keyword and clear() function? Ans. The difference between del keyword and clear() function is that while del keyword removes one element at a time, clear function removes all the elements. 13.Which library is used for plotting in Python language? Ans. Matplotlib is the library used for plotting in Python language. 14.What is Pandas used for? Ans. This library is written for the Python programming language for performing operations like data manipulation, data analysis, etc. The library provides various operations as well as data structures to manipulate time series and numerical tables. 15. How can we create an empty dataframe? Ans. Using function dataframe(). 16. Which function is used to draw a histogram? Ans. hist() 17. What is primary key? Ans. Primary key is a combination of columns that uniquely identifies a row in a relational table. 18. What is candidate key? Ans. All possible combinations of columns that can possibly serve as the primary key are called candidate keys. 19. What is foreign key? Ans. A combination of columns where values are derived from primary key of some other table is called the foreign key of the table in which it is contained. 20. What is alternate key? Ans. A candidate key that is not serving as a primary key is called an alternate key. 21. What is MYSQL? Ans. MYSQL is an open source RDBMS that relies on SQL for processing the data in the database. The database is available for free under the terms of General Public License (GPL). 22. What is RDBMS? Ans. Relational Database Management System (RDBMS) facilitates access, security and integrity of data and eliminates data redundancy. For example, MYSQL, Oracle, Microsoft Sql Server, etc. 23. What is the use of drop command? Ans. Drop command is used to delete tables. For example, Drop Table Orders. Delete commands are used to delete rows of a table. 24. What do you understand by NOT NULL constraint? Ans. This constraint ensures that the null values are not permitted on a specified column. This constraint can be defined at the column level and not at the table level. 25. What is the significance of COUNT? Ans. It is used to count the number of values in a given column or number of rows in a table. For example, Select count (Roll No) from students. 26. How can we delete a table in MYSQL? Ans. We can delete a table in MYSQL using the drop command. 27. How can we delete a record in MYSQL? Ans. We can delete a record in MYSQL using the delete command. 28. How can we add a record and add a column in a table? Ans. We can add a record by using insert command and we can add a column through the alter table command. 29. What is the difference between Delete and Drop commands in SQL? Ans. Delete command is used for removing rows from a table. Delete from tablename where condition; ----- if condition is not given, all the records will be deleted. Delete from Emp where salary <1000; Drop command is used for removing the entire table including the structure from the memory. Drop table tablename; Drop table emp; 30. What is the difference between Alter table and Update commands in SQL? Ans. Alter table command is used to make changes in the table structure like adding a column, removing a column, adding a constraint. 1. Alter table tablename add (columnname datatype constraint); Alter table emp add(bonus int not null); --- constraint is not mandatory. 2. Alter table tablename drop columnname; Alter table emp drop commission; 3. Alter table tablename add constraint(column); Alter table emp add unique(empname); Alter table add primary key(empno); Update command is used to make changes in the existing records of the table. Update tablename set field = value where condition; if condition is not given, all the records will be updated. Update emp set bonus = 10000 where dept=’Sales’; 31. What are constraints in MySQL? Ans. Constraints are rules according to which values are to entered in the records of the table – primary key, unique, not null, default, foreign key. 32. What is computer network? what are the different types of networks? Ans. Network is an interconnection of computers and other devices to share information and resources, for faster communication and to reduce the cost of setting up computers and other devices. Local area network – can connect computers within a distance of 10km. Metropolitan area network – can connect computers within 1 or 2 adjacent cities. Wide area network – can connect computers all over the world. 33. What is topology? Topology is the pattern in which computers are connected to form a network. Star topology – computers are directly connected to a central node. Data transfer rate is high. Costly to set up. Bus topology – computers are connected in a linear fashion to a central cable. Data transfer rate is comparatively high. Not very costly to set up. Ring topology – computers are connected in a circular manner. Difficult to set up. Data transfer rate is medium. Tree topology – hybrid of bus and star topologies. Difficult to set up. Data transfer rate is moderately high. 34. What is the difference between router and gateway? Ans. A router is a device which is responsible for receiving, analyzing and forwarding the data packets to other networks. A router actually determines the destination using IP address of the packet and thus the best way for transferring the packet. It can connect both similar and dissimilar networks. A gateway is a device which acts like a “gate” among the networks. It is also responsible for enabling the traffic flow within the network. Gateway uses more than one protocol for communication thus its activities are much more complex than a switch or a router. So a gateway is a device that is used for the communication among the networks which have a different set of protocols (dissimilar networks). 35. What are net etiquettes? Ans. The net etiquettes are set of is a code of good behavior on the Internet. 36. What is a client server architecture? Ans. A group of computers connected to form a network where a server stores the data and applications and also have devises like printer. The computers known as clients request the server for information and printer time. The server provides the same. This arrangement is called the client server architecture. 37. What are front end and back end applications? Ans. Front end is an application that interact with the users and handles the input/output.eg: python, java, visual basic, C++. Backend is the application that stores the data and provides the same to the front end for input/output. Eg: MySQL, MS Excel, Oracle. Eg for front end/ back end in an application: in the project of grade 12, front end is python(Spyder) and backend is CSV file(MS Excel).
FREQUENTLY ASKED QUESTIONS
38. What is the output of: select mod(10,0);
39. What is the output of: select round(1346.78, 2); 40. What is the output of : select mid(‘Board practicals 2024’, -15); 41. What is the output of : select instr(‘Python programming’, ‘the’); 42.What is the difference between order by and group by clauses? 43.What are the aggregate functions in SQL? 44.How do you display the number of columns and rows in a dataframe? 45.What are the types of data that can be used to define a series? 46.What is the difference between a series and a dataframe? 47.How do you interchange the column labels and row indices in a dataframe? 48.How do you add a row in a dataframe? 49.What are the different types of networks? 50.What is the difference between char and varchar datatypes? 51.Which function should be used to remove spaces from the ends of a string variable? 52. How do you change the index of a dataframe? 53. What are the different types of charts in Python? 54. What is a bar graph? 55. What is the difference between loc and iloc? 56. What is the difference between series and dataframe? 57. What are degree and cardinality of a table? 58. What is equi-join in MySQL? 59. How do you connect 2 tables in MySQL? 60. What is the difference between Update and Delete commands in MySQL? 61. What is the transpose of a dataframe? 62. What is the syntax to remove a column from a dataframe? 63.What is the difference between size and shape attributes of a dataframe? 64. What is the difference between size attribute and count( ) of a dataframe? 65. How can the rows of a dataframe be sorted? 66. What is the difference between loc and iloc attributes of pandas objects? 67. What is meant by dimensionality of a dataframe? 68. Expand pandas. 69. What is the difference between desc statement and desc keyword? 70. What are the software used as front end and back end in different applications? 71. What are the different types of indexing in dataframes? 72. What is Nettiquette? 73. What is digital foot ptint? 74. What is e-waste management? 75. What are the health issued caused by e-waste? 76. What is meant by cybercrime? 77. What the different cybercrimes? 78. What are the different methods to safeguard our system from cybercrimes? 79. What is the difference between MAC address and IP address?
VIVA QUESTIONS PREVIOUS YEARS
1. What is the difference between order by and group by clauses? 2. What are the aggregate functions in SQL? 3. How do you display the number of columns and rows in a dataframe? 4. What are the types of data that can be used to define a series? 5. What is the difference between a series and a dataframe? 6. How do you interchange the column labels and row indices in a dataframe? 7. How do you add a row in a dataframe? 8. What are the different types of networks? 9. What is the difference between char and varchar datatypes? 10. Predict the output for the given statement with mod(). 11. Predict the output for the given statement with round(). 12. Predict the output for the given statement with mid(). 13. Predict the output for the given statement with instr(). 14. Which function should be used to remove spaces from the ends of a string variable? 15. How do you change the index of a dataframe? 16. What are the different types of charts in Python? 17. What is a bar graph? 18. What is the difference between loc and iloc? 19. What is the difference between series and dataframe? 20. What are degree and cardinality of a table? 21. How to access a specific value in a row and column in a dataframe?