CBSE Class 12th IP/CS Viva Questions and Answers (Python, MySQL, Networking, Societal Impacts)

CBSE Class 12th IP/CS Viva Questions and Answers (Python, MySQL, Networking, Societal Impacts)

Python Questions

  1. Q: What are Python’s key features?
    A: Python is interpreted, high-level, dynamically typed, and supports object-oriented programming.
  2. Q: What is the difference between a list and a tuple?
    A: Lists are mutable, whereas tuples are immutable.
  3. Q: How do you declare a variable in Python?
    A: Variables are declared when they are assigned a value, e.g., x = 5.
  4. Q: Explain the use of the range() function.
    A: It generates a sequence of numbers. Example: range(5) creates [0, 1, 2, 3, 4].
  5. Q: What is the difference between is and ==?
    A: is checks identity, whereas == checks equality.
  6. Q: What is a Python dictionary?
    A: It is an unordered collection of key-value pairs.
  7. Q: What is the output of print(2 ** 3)?
    A: 8
  8. Q: Explain list comprehension.
    A: It provides a concise way to create lists. Example: [x**2 for x in range(5)].
  9. Q: How can you handle exceptions in Python?
    A: Using try, except, and finally blocks.
  10. Q: What are Python’s data types?
    A: Common types include int, float, str, list, tuple, dict, and bool.
  11. Q: What is a Python module?
    A: A file containing Python code that can be imported.
  12. Q: What are *args and **kwargs?
    A: *args passes variable-length positional arguments; **kwargs passes variable-length keyword arguments.
  13. Q: How do you define a function in Python?
    A: Using the def keyword, e.g., def func_name():.
  14. Q: What are lambda functions?
    A: Anonymous functions defined with the lambda keyword.
  15. Q: Explain the difference between del and remove() in lists.
    A: del removes an element by index, whereas remove() removes by value.
  16. Q: What is recursion?
    A: A function calling itself directly or indirectly.
  17. Q: How do you read a file in Python?
    A: Using open() followed by .read() or .readlines().
  18. Q: What is the purpose of the with statement in file handling?
    A: It ensures proper cleanup of file resources.
  19. Q: How do you import a specific function from a module?
    A: Using from module import function.
  20. Q: How do you concatenate strings in Python?
    A: Using the + operator or join() method.

MySQL Questions

  1. Q: What is SQL?
    A: SQL stands for Structured Query Language used to manage relational databases.
  2. Q: What are primary keys?
    A: A column or set of columns uniquely identifying a row in a table.
  3. Q: What is the difference between CHAR and VARCHAR?
    A: CHAR is fixed-length, while VARCHAR is variable-length.
  4. Q: How do you fetch data from a table?
    A: Using the SELECT statement, e.g., SELECT * FROM table_name;.
  5. Q: Explain the use of the WHERE clause.
    A: Filters rows based on a condition.
  6. Q: What is a foreign key?
    A: A key in one table referencing a primary key in another.
  7. Q: How do you add a column to an existing table?
    A: Using ALTER TABLE table_name ADD column_name datatype;.
  8. Q: What are joins in SQL?
    A: Joins combine rows from two or more tables based on a related column.
  9. Q: Explain the difference between INNER JOIN and OUTER JOIN.
    A: INNER JOIN returns matching rows; OUTER JOIN includes unmatched rows too.
  10. Q: How do you create a database?
    A: Using CREATE DATABASE db_name;.
  11. Q: What are constraints in SQL?
    A: Rules enforced on columns, like NOT NULL, UNIQUE, and CHECK.
  12. Q: How do you delete a table?
    A: Using DROP TABLE table_name;.
  13. Q: What is the use of GROUP BY?
    A: Groups rows sharing a property and performs aggregate calculations.
  14. Q: How do you sort results in SQL?
    A: Using ORDER BY column_name ASC/DESC;.
  15. Q: What are aggregate functions?
    A: Functions like SUM(), AVG(), COUNT(), MIN(), and MAX().
  16. Q: Explain the LIKE operator.
    A: Used for pattern matching with % and _.
  17. Q: What is the difference between TRUNCATE and DELETE?
    A: TRUNCATE removes all rows, DELETE can filter rows.
  18. Q: How do you back up a MySQL database?
    A: Using mysqldump utility.
  19. Q: What is indexing in SQL?
    A: It improves query performance by reducing data retrieval time.
  20. Q: How do you count rows in a table?
    A: Using SELECT COUNT(*) FROM table_name;.

Networking Questions

  1. Q: What is a computer network?
    A: A collection of interconnected devices sharing resources and information.
  2. Q: What are the types of networks?
    A: LAN, MAN, WAN, PAN, and WLAN.
  3. Q: Define IP address.
    A: A unique address identifying devices on a network.
  4. Q: What is the difference between IPv4 and IPv6?
    A: IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses.
  5. Q: What is a MAC address?
    A: A hardware address unique to a network interface.
  6. Q: What are the layers of the OSI model?
    A: Physical, Data Link, Network, Transport, Session, Presentation, Application.
  7. Q: What is DNS?
    A: Domain Name System maps domain names to IP addresses.
  8. Q: Define HTTP and HTTPS.
    A: HTTP is unsecured; HTTPS uses SSL/TLS for encryption.
  9. Q: What is the role of a router?
    A: Directs data packets between networks.
  10. Q: What is a firewall?
    A: A security system to monitor and control network traffic.

Societal Impacts Questions

  1. Q: What is digital divide?
    A: The gap between those with and without access to technology.
  2. Q: What are the ethical concerns in AI?
    A: Bias, job displacement, privacy, and accountability.
  3. Q: How can social media impact mental health?
    A: It can lead to anxiety, depression, and self-esteem issues.
  4. Q: What are the benefits of e-governance?
    A: Transparency, efficiency, and accessibility of government services.
  5. Q: Explain phishing.
    A: Fraudulent attempts to obtain sensitive information via fake emails or websites.
  6. Q: What is cyberbullying?
    A: Bullying through digital platforms like social media.
  7. Q: Define intellectual property rights (IPR).
    A: Legal rights protecting creators’ works.
  8. Q: What is net neutrality?
    A: The principle that ISPs must treat all data equally.
  9. Q: What is the impact of e-waste?
    A: Pollution, health hazards, and resource depletion.
  10. Q: How can technology reduce carbon footprints?
    A: Through energy-efficient devices and renewable energy technologies.

Additional Questions

  1. Q: What is the difference between sort() and sorted() in Python?
    A: sort() modifies the list in place, while sorted() returns a new sorted list.
  2. Q: How do you create a virtual environment in Python?
    A: Using venv, e.g., python -m venv env_name.
  3. Q: What is the use of super() in Python?
    A: It is used to call a method from a parent class.
  4. Q: What is the purpose of the zip() function in Python?
    A: It combines two or more iterables into tuples.
  5. Q: How do you create a view in MySQL?
    A: Using CREATE VIEW view_name AS SELECT ....
  6. Q: What is a self-join in SQL?
    A: A table joining with itself.
  7. Q: What is subnetting in networking?
    A: Dividing a network into smaller subnetworks.
  8. Q: What is an IP conflict?
    A: When two devices have the same IP address on a network.
  9. Q: Explain the concept of port numbers.
    A: Port numbers identify specific processes or services on a network.
  10. Q: What is a proxy server?
    A: It acts as an intermediary between a client and the internet.
  11. Q: What are cookies in web technology?
    A: Small data files stored on a user’s device by websites.
  12. Q: What is the difference between symmetric and asymmetric encryption?
    A: Symmetric uses one key for encryption and decryption; asymmetric uses a key pair.
  13. Q: Define data encapsulation in networking.
    A: Wrapping data with protocol information at each layer of the OSI model.
  14. Q: What is the purpose of a gateway in a network?
    A: It connects different networks and translates protocols.
  15. Q: How does two-factor authentication work?
    A: It combines two verification methods, like a password and an OTP.
  16. Q: What is the purpose of a data dictionary in a database?
    A: It stores metadata about the database structure.
  17. Q: What is an ER diagram?
    A: A visual representation of entities and relationships in a database.
  18. Q: What is the difference between HAVING and WHERE in SQL?
    A: HAVING filters grouped data; WHERE filters rows before grouping.
  19. Q: What is latency in networking?
    A: The delay in data transfer from source to destination.
  20. Q: What is the importance of green computing?
    A: Reducing energy consumption and environmental impact of computing.
  21. Q: Define multitasking in operating systems.
    A: Running multiple processes simultaneously.
  22. Q: What is steganography?
    A: Hiding data within other non-secret files or data.
  23. Q: Explain phishing attacks in cybersecurity.
    A: Fraudulent attempts to steal sensitive information through fake communications.
  24. Q: What is the purpose of MySQL’s LIMIT clause?
    A: Restricts the number of rows returned by a query.
  25. Q: What is a loopback address?
    A: An IP address (127.0.0.1) used for testing the local machine.
  26. Q: Define bandwidth in networking.
    A: The maximum data transfer rate of a network.
  27. Q: What is the function of the ARP protocol?
    A: Resolves IP addresses to MAC addresses.
  28. Q: What are the risks of open Wi-Fi networks?
    A: Data theft, man-in-the-middle attacks, and unauthorized access.
  29. Q: What is SQL injection?
    A: A code injection attack exploiting database vulnerabilities.
  30. Q: How does SSL/TLS secure data transmission?
    A: By encrypting data between a client and server.
  31. Q: What is cloud computing?
    A: Delivery of computing services over the internet.
  32. Q: Define biometrics in security.
    A: Authentication using physical traits like fingerprints or retina scans.
  33. Q: What is the function of a packet sniffer?
    A: Captures and analyzes network traffic.
  34. Q: How does a VPN work?
    A: Creates a secure, encrypted connection over a public network.
  35. Q: What is ransomware?
    A: Malicious software that encrypts data until a ransom is paid.
  36. Q: What are ethical hacking and penetration testing?
    A: Practices to identify and fix security vulnerabilities.
  37. Q: Define digital signature.
    A: Electronic signature ensuring the authenticity of a message or document.
  38. Q: What is hashing in cryptography?
    A: Converting data into a fixed-size string, often used for verification.
  39. Q: What is the Internet of Things (IoT)?
    A: A network of interconnected devices that communicate over the internet.
  40. Q: How can individuals ensure online privacy?
    A: By using strong passwords, enabling encryption, and avoiding suspicious links.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *