0% found this document useful (0 votes)
16 views7 pages

Viva Voce 1734773389

Copyright
© © All Rights Reserved
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% found this document useful (0 votes)
16 views7 pages

Viva Voce 1734773389

Copyright
© © All Rights Reserved
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/ 7

VIVA VOCE

1. What is Python? What are the benefits of using Python?


Python is a high level interpreted programming language.
It is beginner-friendly, easy to learn, and is suited for programmers of all levels of expertise.

2. What is pickling and unpickling?


Pickling is a process by which a Python object hierarchy is converted to byte stream.
Unpickling is the inverse process of pickling by which a binary object or byte stream is converted to a Python
object hierarchy.

3. What is the difference between list and tuple?


Lists are mutable, their data can be changed without changing them to a new memory address, whereas tuples
are immutable and once declared, updation is possible only by redefinition.

4. What are the built-in types that Python provides?


Integer, Booleans, Floating point numbers, Complex numbers, Strings, Lists, Tuples, Sets, Dictionaries, None object
etc

5. What is namespace in Python?


A namespace of a scope is a system that has a unique name and definition for each and every object in that scope.
An object might be a variable or a method. Python itself maintains a namespace in the form of a Python
dictionary.

6. What is pass in Python?


Pass is a keyword in Python, which is used as a placeholder for future Python statements and the interpreter
treats it as an idle statement valid by itself.

7. What is slicing in Python?


Slicing is the process of getting a subset of elements from an iterable based on their indices.

8. What is docstring in Python?


As mentioned above, Python docstrings are strings used right after the definition of a function, method, class, or
module.
They are used to document our code.

9. What is negative index in Python?


Python supports negative indexing by returning elements from the end of the iterable in reverse order.

10. How can you convert a number into a string?


A number can be converted to string using the str() constructor function.

11. What do you understand by module and package in Python?


A module is an importable Python file, while a package is a directory of Python modules containing an additional
__init__.py file, to distinguish from a directory that just contains a bunch of Python scripts.

12. What are the rules for local and global variables in Python?
If a variable is defined inside an isolated block of code, then the variable is implicitly local.
A global variable has its scope as the entire program, and is defined explicitly using the global keyword inside a
function block, and in the __main__ namespace.

13. How can you generate random numbers in Python?


We can generate pseudo-random numbers with the help of methods defined in the random module.
14. What is the use of // operator in Python?
// operator returns the quotient when a number is divided by another.

15. Mention five benefits of using Python.


+ Suited for all levels of programmers.
+ Extensive free and open source libraries and modules for almost all purposes
+ Free and open source-community development
+ Ease of learning, python syntax resembles executable pseudo-code
+ User-friendly data structures, dynamic typing, automatic memory management.

16. Mention the use of the split function in Python.


string.split () method accepts a character and returns the list of substrings from the string separated by the given
character. By default, the string is split by whitespaces.

17. What are literals in Python?


A literal is a notation for representing a fixed value in source code such as integers, floating-point numbers, and
strings.

18. Explain Python functions.


A function is an isolated, callable block of code that executes a set of statements.
It may or may not accept an input, and may or may not return a value after execution.

19. Name the different file processing modes supported by Python.


Read-r, r+, rb, r+b; Write-w, w+, wb, w+b; Append-a, a+, ab, a+b

20. What is an operator in Python?


Operators are special symbols in Python that carry out arithmetic or logical computation

21. What are the different types of operators in Python?


Arithmetic, Logical, Comparison, Assignment, Bitwise, Membership, Identity operators

22. What is a Dictionary in Python?


A dictionary is a mutable data structure that stores data as key: value pairs.

23. Explain the use of try: except .


try: except: statements are used to isolate blocks of code to check for errors and exceptions.

24. What is the purpose of PYTHONPATH environment variable?


PYTHONPATH is an environment variable which is used to add additional directories where python will look for
modules and packages. It also allows easier python access from the terminal.

25. What are the supported data types in Python?


Integer, Booleans, Floating point numbers, Complex numbers, Strings, Lists, Tuples, Sets, Dictionaries, None object
etc are built in data Types. Users can also define custom data types using class keyword.

26. What is the difference between lists and tuples?


Lists are mutable, their data can be changed without changing them to a new memory address, whereas tuples
are immutable and once declared, updation is possible only by redefinition.

27. How will you reverse a list?


By using list slicing : list[::-1] returns a reversed list
28. What is a string in Python?
Strings are immutable sequences that store an array of characters.

29. Why is the return keyword used in Python?


Return keyword is used for two purposes; It explicitly determines the termination of a Python function, before or
at the end of function definition, and to return a value after the execution of the function block.

30. When should you use the “Break” in Python?


Break keyword is used inside an iteration to perform the forced termination of the loop ignoring subsequent
statements in the loop and loop else blocks.

31. What is a tuple in Python?


Tuple data types in python are immutable sequences that store an ordered collection of objects and are enclosed
by parentheses.

32. Explain the use of “with” statement.


with statement in Python is used in exception handling to make the code cleaner and much more readable.
It simplifies the management of common resources like file streams.

33. Differentiate between append() and extend() methods.


Python append() method adds an element to a list, and the extend() method concatenates the first list with
another list (or another iterable).

34. What are the advantages of Python recursion?


Recursion allows us to shorten code by reusing the same set of instructions, along with a single base case.

35. How can we get current directory using Python?


We can get the current working directory by using the getcwd() method defined under os module

36. What is the difference between del keyword and pop() ?


"del object" removes the definition of the object from the local scope and does not return anything, whereas
pop() removes the item at a specified index from an iterable and returns the same.

37. What is primary key?


A primary key is a field or a group of fields that uniquely specify a record in a relation.

38. What is candidate key?


Any field that can become a primary key is called a candidate key.

39. What is foreign key?


A foreign key is a set of attributes in a table that refers to the primary key of another table.

40. What is alternate key?


Any candidate key other than the primary key in a table is called alternate key

41. What is MYSQL?


MySQL is an open-source relational database management system (RDBMS).

42. What is RDBMS?


A relational database is a digital database based on the relational model of data.
The relational model (RM) for database management is an approach to managing data using a structure and
language where all data is represented in terms of tuples, grouped into relations.
43. What is the use of drop command in SQL?
DROP is used to delete a whole database or just a table

44. What do you understand by NOT NULL constraint?


The NOT NULL constraint enforces a column to not accept NULL values, that is all records must have a value in
that attribute.

45. What is the significance of COUNT?


The COUNT() function returns the number of rows in a table satisfying the criteria specified in the WHERE clause.

46. How can we delete a table in MYSQL?


DROP TABLE <tablename>;

47. How can we delete a record in MYSQL?


DELETE FROM <tablename> WHERE <condition>;

48. How can we add a record and add a column in a table?


adding a record : INSERT INTO <tablename> VALUES (value1, value2, .....);
adding a column : ALTER TABLE <tablename> ADD column-name datatype constraint;

49. What is the difference between del and remove methods of list?
del list[i] deletes the element of the list at the specified index, whereas list.remove(element) removes the first
occurence of the element form the list

50. What is the output of


for x in [1, 2, 3]:
print(x)?

1
2
3

51. What is the return keyword used for in Python?


Return keyword is used for two purposes; It explicitly determines the termination of a Python function, before or
at the end of function definition, and to return a value after the execution of the function block.

52. What is the purpose of id() in python?


The id() function returns a unique identity for the specified object

53. How would you convert a string into lowercase?


string.lower()

54. print(‘Ayushi’.isupper())
False
55. Write output of the following:

for i in range(7):
if i==3:
continue
print(i)

0
1
2
4
5
6

56. What are membership operators?


Membership operators test the presence of an element in an iterable

57. What are identity operators?


Identity operators are used to compare the objects, not if they are equal, but if they are actually the same object,
with the same memory location

58. How do you calculate the number of characters of the string ‘Ayushi Sharma’?
len('Ayushi Sharma')

59. How will you print the string ‘Python’ five times

print('Python\n'*5)

(or)

for i in range(5):
print('Python')

60. What is the difference between list and dictionary?


A list is an ordered sequence of objects, whereas dictionaries are unordered sets.
Elements in a list are accessed by their indices whereas the elements of a dictionary are accessed by keys.

61. What is pickling and unpickling?


Pickling is a process by which a Python object hierarchy is converted to byte stream.
Unpickling is the inverse process of pickling by which a binary object or byte stream is converted to a Python
object hierarchy.

62. What are Python Libraries? Name any two


Module is a file which contains various Python functions and global variables. It is simply just .py extension file
which has python executable code.
Package is a collection of modules. It must contain an init.py file as a flag so that the python interpreter processes
it as such. The init.py could be an empty file without causing issues.
Library is a collection of packages and modules. Often libraries contain a package or multiple related packages,
but it could be even a single module.
Some python libraries are Matplotlib, Numpy, Scipy etc.
63. What are the three ways to import modules in Python?
import module
import module.object
from module import *

64. What is the difference between char and varchar in MYSQL?


The CHAR data type allows you to store fixed-length strings with a maximum size of 255 characters.
Whereas the VARCHAR data type allows you to store variable-length strings with a maximum size of 65,535
characters.

65. What is the difference between primary key and candidate key?
A primary key is a field or a group of fields that uniquely specify a record in a relation while any field that can
become a primary key is called a candidate key.

66. What is the difference between NOW() and CURRENT_DATE()?


NOW() returns a constant time that indicates the time at which the statement began to execute.
Current_date() will only give you the date.
SYSDATE() returns the exact time at which it executes.

67. What is the difference between SQL and MYSQL?


SQL is a query language, whereas MySQL is a relational database that uses SQL to query a database.

68. What is the difference between database and table in MYSQL?


A database is a collection of organized data and features used to access them, whereas the table is a collection of
rows and columns used to store the data.

69. How to add columns in MYSQL?


adding a column : ALTER TABLE <tablename> ADD column-name datatype constraint;

70. How to delete a table in MYSQL?


DROP TABLE <tablename>;

71. How to create a table in MYSQL?


CREATE TABLE tablename(attributes);

72. How to delete columns in a table in MYSQL?


ALTER TABLE tablename DROP columnname

73. How to insert data in MYSQL?


INSERT INTO <tablename> VALUES (value1, value2, .....);

74. How to delete a row in MYSQL?


DELETE FROM <tablename> WHERE <condition>;

75. How to join two tables in MYSQL?


SELECT * FROM Table1 A, Table2 B WHERE A.field1 = B.field1;
*****************
Project VIVA

1. Describe your project

2. Advantages of your project

3. How you gathered requirement of your project?

4. How and where can you implement your project?

5. Which software is used in your project?

6. What are the methodologies used in your project?

7. What is your role in the project?

8. Explain the data flow of your project?

9. What are the drawbacks of your system?

10. From where did you get reference/guide for your project work?

11. What is your group size? How did you divide the tasks among yourselves?

12. Why did you choose this topic?

13. Mention three most important references that helped you in executing the project

14. Given a chance now, do you think you can perform well in the project, If yes , then explain how?

15. Have you made this project yourself?

16. What is the front end and back end of your project?

17. What are the different modules used in your project?

18. What have you learned from the project?

19. What were the objectives of the project?

20. Were the objectives addressed?

21. If you were to start again, is there anything you would like to change?

22. What were the best features of your project?

23. ‘My project is my Original work’. Comment on this.

24. Explain the working of each individual component

25. What went wrong in your project?

26. What strategy did you follow to integrate daily developments of your project?

You might also like