0% found this document useful (0 votes)
10 views

Viva

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)
10 views

Viva

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/ 10

PYTHON

1. Name two modes of Python.

• Interactive Mode

• Script Mode

2. Difference between interactive mode vs script mode

• Interactive Mode: Allows immediate execution of statements and displays


results. Useful for testing small code snippets.

• Script Mode: Executes a pre-written Python script. Useful for longer programs
saved as .py files.

3. Write the Full Form of IDLE

• Integrated Development and Learning Environment.

4. In which mode do we get the result immediately after executing the command?

• Interactive Mode.

5. What do you mean by comments in Python?

• Comments are used to explain code and make it more readable. They are
ignored by the Python interpreter.

6. Which symbols are used for single-line comments and multi-line comments?

• Single-line Comments: #

• Multi-line Comments: Triple quotes ''' or """ (though technically not comments
but docstrings).

7. Name five primitive data types in Python.

• Integer, Float, String, Boolean, Complex.

8. Write three numeric data types in Python.

• Integer (int), Float (float), Complex (complex).

9. Name three sequential data types in Python.

• List, Tuple, String.

10. Which data type stores the combination of real and imaginary numbers?

• Complex (complex).

11. What do you mean by Escape sequence?


• Escape sequences are special characters, preceded by a backslash (\), used to
represent certain characters (e.g., \n for newline, \t for tab).

12. What is the purpose of a break statement?

• The break statement is used to exit a loop prematurely when a condition is met.

13. What is the difference between eval() and int() functions?

• eval(): Evaluates a string as a Python expression.

• int(): Converts a value to an integer.

14. What is the difference between Lists and Tuples?

• Lists: Mutable, can be modified. Defined with [].

• Tuples: Immutable, cannot be modified. Defined with ().

15. What do you mean by Traversing?

• Traversing refers to accessing each element of a data structure (e.g., list, string)
one by one.

16. What do you mean by Replicating?

• Replicating is creating multiple copies of a sequence using the * operator (e.g.,


[1, 2] * 3 results in [1, 2, 1, 2, 1, 2]).

17. What is the purpose of Try and Except in Python?

• It is used for handling exceptions (errors) gracefully without crashing the


program.

18. What is the append() function in reference to the list?

• The append() function adds a single element to the end of a list.

19. What is the meaning of Scope of Variable?

• Scope defines where a variable can be accessed in the program (e.g., local or
global).

20. What is the difference between global and local variables?

• Global: Defined outside functions, accessible throughout the program.

• Local: Defined inside functions, accessible only within that function.

21. What is the module in Python?

• A module is a file containing Python code (functions, classes, variables) that can
be imported and reused.
22. What is the difference between a Text file and Binary File?

• Text File: Stores data in human-readable form (e.g., .txt).

• Binary File: Stores data in machine-readable form (e.g., .bin).

23. Name three modes of opening a file.

• 'r' (read), 'w' (write), 'a' (append).

24. What is the difference between the read() and read(n) methods?

• read(): Reads the entire file.

• read(n): Reads the first n characters.

25. What is the difference between the readline() and readlines() methods?

• readline(): Reads a single line.

• readlines(): Reads all lines and returns them as a list.

26. Expand FIFO

• First In First Out.

27. Expand LIFO

• Last In First Out.

28. cursor() function use?

• Used in database programming to execute SQL commands.

29. dump() function use?

• Used in the pickle module to serialize (convert to a byte stream) Python objects.

30. commit() function use?

• Saves changes to a database during database transactions.

31. Parameters of connect() in connectivity of MySQL

• Host, User, Password, Database.

32. Difference between type() and typecasting

• type(): Returns the data type of a value.

• Typecasting: Converts one data type into another.

33. Use of sep= argument

• Specifies the separator string in the print() function.


34. Text file access comes under which Python module?

• os and io.

35. What is the use of id()?

• Returns the memory address of an object.

36. Difference between == and =

• ==: Comparison operator.

• =: Assignment operator.

37. Use of pass statement

• Acts as a placeholder; does nothing when executed.

38. What are the membership operators used in Python?

• in and not in.

39. Difference between capitalize() and title() in string variables

• capitalize(): Converts the first character of a string to uppercase.

• title(): Converts the first character of each word to uppercase.

40. What is mutable and immutable?

• Mutable: Can be changed (e.g., list).

• Immutable: Cannot be changed (e.g., tuple, string).

41. Difference between append(), extend(), and insert() in a list

• append(): Adds one element to the end of the list.

• extend(): Adds elements of an iterable to the end.

• insert(): Inserts an element at a specific position.

42. Difference between pop(), remove(), del() in a list

• pop(): Removes an element by index and returns it.

• remove(): Removes the first occurrence of a specified value.

• del(): Deletes an element or slice without returning it.

43. Can you say any 4 types of errors?

• SyntaxError, IndentationError, TypeError, ValueError.


MySQL

1. What is the full form of RDBMS?

• Relational Database Management System.

2. What do you mean by Degree and Cardinality?

• Degree: The number of columns (attributes) in a table.

• Cardinality: The number of rows (tuples) in a table.

3. What is Primary Key in a table?

• A unique identifier for each row in a table. It cannot contain null values and must
be unique.

4. What do you mean by Candidate Key?

• A set of attributes that can uniquely identify a row in a table. One candidate key
is chosen as the primary key.

5. What is Alternate Key in a table?

• Candidate keys that are not chosen as the primary key.

6. Define Foreign Key.

• An attribute in one table that references the primary key of another table to
establish a relationship between the two tables.

7. Expand DML and DDL.

• DML: Data Manipulation Language (e.g., SELECT, INSERT, UPDATE, DELETE).

• DDL: Data Definition Language (e.g., CREATE, ALTER, DROP, TRUNCATE).

8. Differentiate between Char and Varchar.

• Char: Fixed-length string. Always occupies the defined size, even if the string is
smaller.

• Varchar: Variable-length string. Occupies only as much space as the string


length (up to the defined maximum).

9. Which symbols are used to give Single-line and Multiple-line comments in


MySQL?

• Single-line: -- or #.

• Multi-line: /* */.
10. Write a command to display all the existing databases in MySQL.

SHOW DATABASES;

11. Write a command to display the structure of table “Stock”.

DESCRIBE Stock;

12. What is the difference between Update and Alter command in MySQL?

• Update: Modifies the data in existing rows of a table.

• Alter: Modifies the structure of a table (e.g., adding or removing columns).

13. What is the difference between Delete and Drop command?

• Delete: Removes specific rows from a table. Table structure remains.

• Drop: Removes the entire table, including its structure.

14. Which command is used to remove the database?

DROP DATABASE database_name;

15. What is the purpose of the Order by Clause?

• It is used to sort the result set in ascending (ASC) or descending (DESC) order
based on one or more columns.

16. Name two wildcard symbols which are used in MySQL for pattern matching.

• _ (matches a single character).

• % (matches zero or more characters).

17. Name the clause which is used to display unique values from a column.

• DISTINCT.

18. How many values are returned by aggregate functions in MySQL?

• Aggregate functions return a single value for a group of rows.

19. What is the difference between Count() and Count(*)?

• Count(): Counts the number of non-null values in a column.

• Count(*): Counts all rows, including those with null values.

20. Differentiate between Order by and Group by clause.

• Order by: Sorts the result set.

• Group by: Groups rows with the same values in specified columns and applies
aggregate functions.
21. Which function concatenates two strings in MySQL?

• CONCAT().

22. What is the difference between Now() and Sysdate()?

• Now(): Returns the current date and time when the query starts executing.

• Sysdate(): Returns the current date and time at the exact moment it is executed.

23. Difference between fetchone(), fetchall(), fetchmany()?

• fetchone(): Fetches one record at a time.

• fetchall(): Fetches all rows from the result set.

• fetchmany(size): Fetches a specified number of rows (defined by size).

PROJECT

1. Which concepts have you used for your project?

• Object-Oriented Programming (OOP): Used for modular and reusable code.

• Database Management: MySQL is used for storing and retrieving data.

• GUI Development: PyQt5 for creating the user interface.

• Error Handling: Managed using try-except blocks.

• Database Connectivity: Python's mysql.connector module for interacting with


the MySQL database.

2. What are the software and minimum hardware required for your project?

Software:

• Python (version 3.8 or higher)

• MySQL Server

• PyQt5 library

• MySQL Connector for Python

Minimum Hardware:
• Processor: Intel Core i3 or higher

• RAM: 4 GB or more

• Storage: 100 MB for database and application

• Operating System: Windows, Linux, or macOS

3. Explain the dataflow of your project.

1. User Input: The user interacts with the GUI to input data such as service details,
vehicle details, or appointment booking.

2. Database Interaction: The input data is sent to the MySQL database using
queries.

3. Processing: Queries are executed to fetch, update, or delete records in the


database.

4. Output: The results (e.g., available services, vehicle status, or receipts) are
displayed on the GUI.

4. Why did you choose this topic?

• To address inefficiencies in traditional car service management systems.

• To provide a centralized, user-friendly system for managing appointments,


vehicle status, and service details.

• To gain experience with database integration, GUI development, and real-world


problem-solving.

5. What is your proposed system to overcome the problems faced in the existing
system?

• Centralized Database: Stores all data securely and makes it easily accessible.

• GUI Interface: Simplifies user interaction.

• Automated Receipts: Generates detailed service receipts instantly.

• Real-time Status Updates: Allows customers to check the current status of


their vehicles.

• Error Validation: Ensures accurate and validated user input.


6. What is the future scope of your project?

• Adding online payment integration.

• Implementing SMS or email notifications for appointment reminders.

• Expanding to a web-based or mobile application for broader accessibility.

• Introducing AI-driven service recommendations based on customer history.

• Supporting multiple branches of service centers with centralized management.

7. What are the limitations of your project?

• Currently, it is a desktop-based application and not available on the web.

• No support for multiple users or roles (e.g., admin vs. customer).

• No real-time synchronization if used across multiple devices.

• Limited error handling and logging mechanisms for debugging.

8. Which books/study material/websites have you used while making this project?

• Books:

o "Python Crash Course" by Eric Matthes

o "MySQL Tutorial" by Luke Welling

• Websites:

o Python official documentation (https://docs.python.org/)

o PyQt5 documentation (https://doc.qt.io/qtforpython/)

o MySQL official documentation (https://dev.mysql.com/doc/)

o Stack Overflow for troubleshooting.

9. How did you gather requirements for this project?

• Conducted research on existing car service management practices.

• Identified pain points such as manual record-keeping and lack of transparency.

• Collected feedback from potential users like car owners and service center staff.
• Reviewed common features in similar systems for inspiration.

10. How and where can you implement your project?

• Implementation:

o At small or medium-sized car service centers.

o As a desktop application for staff to manage services and appointments.

• Use Cases:

o Appointment scheduling.

o Vehicle status tracking.

o Generating service receipts.

11. What is the frontend and backend of your project?

• Frontend: PyQt5 for creating the graphical user interface.

• Backend: MySQL for data storage and Python for logic processing.

12. Have you made this project yourself?

Yes, the project has been developed entirely by me, including the design, coding,
database schema, and testing.

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

1. View Services Module: Displays the list of available services.

2. Appointment Booking Module: Allows users to book appointments.

3. Vehicle Status Check Module: Lets users check the status of their vehicles.

4. Update Vehicle Status Module: Enables staff to update the status of vehicles.

5. Receipt Generation Module: Generates detailed receipts for services.

You might also like