Let’s start the viva voce questions covering Python basics, Pandas, Matplotlib, SQL, Networks, Emerging Trends & Societal Impacts. Here we go!
1. What is Python and who developed it? Python is a very friendly, high-level programming language that reads almost like normal English. It’s super popular for beginners and experts alike — used for websites, games, data science, AI, automation, and more. It was created by Guido van Rossum in 1991 in the Netherlands. He is lovingly called the “Benevolent Dictator for Life” of Python because he guided its development for many years.
2. What are the two execution modes in Python? Python has two ways to run code:
- Interactive mode (also called REPL): You type one line at a time and see the result immediately — perfect for quick testing and learning. Example: Open Python shell and type print(“Hello”) → it shows Hello right away.
- Script mode: You write the complete program in a .py file, save it, and run the whole file at once — ideal for real projects and assignments. Remember: “Interactive = chatting with Python, Script = sending a full letter.”
3. What is the importance of indentation in Python? Indentation (spaces or tabs at the beginning of lines) tells Python which lines belong to the same block of code — there are no curly braces {} like in C/C++/Java. Usually we use 4 spaces (most common and recommended). Wrong or inconsistent indentation causes IndentationError. Easy memory tip: “Python is very disciplined — it judges your code by how neatly you indent!”
4. What are identifiers in Python? Give rules. Identifiers are the names you give to variables, functions, classes, etc. (like naming your school bag or phone). Rules (remember “START CLEAN”):
- Starts with letter (a-z, A-Z) or underscore _
- Can have letters, digits (0-9), underscore after first character
- Total no spaces allowed
- A case-sensitive (Age and age are different)
- Reserved words (keywords) not allowed
- Typically meaningful names (good practice: roll_no, student_name)
5. Name some keywords in Python. Keywords are special reserved words that Python already uses — you cannot name your variable with them. Common ones: if, else, elif, for, while, def, return, import, class, True, False, None, and, or, not, break, continue, pass, global, del.
6. What are constants and variables in Python?
- Variable: A named storage box whose value you can change anytime. Example: marks = 75; marks = 82 (changed).
- Constant: A value you decide not to change — Python doesn’t force it, but by convention we write constants in ALL CAPITAL letters. Example: PI = 3.14159, MAX_STUDENTS = 50. Easy tip: “Variables are moody — they change. Constants are loyal — they stay the same.”
7. What are the types of operators in Python? Operators are symbols that perform actions on data. Main categories:
- Arithmetic: + – * / // (floor division) % ** (power)
- Relational / Comparison: == != > < >= <=
- Logical: and or not
- Assignment: = += -= *= /= //= %=
- Identity: is is not
- Membership: in not in Mnemonic to remember: “A Real Lion Is Angry” (Arithmetic, Relational, Logical, Identity, Assignment)
8. Explain precedence of operators in Python. Python decides which operation to do first using this order (remember PEMDAS-BO):
- Parentheses ()
- Exponents **
- Multiplication * Division / // %
- Addition + Subtraction –
- Relational operators (>, <, == etc.)
- Logical operators (not → and → or) Tip: When confused → always use parentheses to make it clear!
9. What are mutable and immutable data types? Give examples.
- Mutable (changeable): You can modify them after creation — like a notebook you can erase and rewrite. Examples: list, dictionary, set
- Immutable (unchangeable): Once created, you can’t modify — like a printed exam paper. Examples: int, float, string, tuple, bool Memory trick: “Mutable = mood swings (lists & dicts change), Immutable = fixed personality (strings & tuples don’t)”
10. What is the difference between expression and statement?
- Expression: Something Python can evaluate to produce a single value. Examples: 5 + 3, “Hello” + ” World”, len(“Python”)
- Statement: An instruction that tells Python to do something — may or may not produce value. Examples: print(“Hi”), x = 10, if x > 5: Easy: “Expression = calculator gives answer, Statement = command you give.”
11. How do you take input and display output in Python?
- Input: Use input() function. It always returns a string. Example: name = input(“Enter name: “) age = int(input(“Enter age: “)) # convert to number
- Output: Use print() function. Example: print(“Hello”, name, “you are”, age, “years old”) Modern way: print(f”Hello {name}! You are {age} years old.”) Tip: f-strings are easiest — just put f before quotes and variables in {}.
12. What is type conversion? Give examples. Type conversion means changing one data type to another. Two types:
- Implicit (automatic by Python): When mixing types safely. Example: 10 + 5.5 → becomes 15.5 (int converted to float)
- Explicit (you force it): Using functions. Examples: int(“45”) → 45, float(10) → 10.0, str(100) → “100”, bool(1) → True Remember: “Python is polite — does small conversions itself, big ones you ask.”
13. What is debugging in Python? Debugging means finding and fixing errors (bugs) in your program. Common error types:
- Syntax errors: Spelling/writing mistake (forgot colon 🙂
- Logical errors: Code runs but gives wrong result
- Runtime errors: Crash during execution (division by zero, file not found) Best friend for debugging: Use print() statements to see variable values at different steps!
14. Explain if-else and if-elif-else with example.
- if-else: Check one condition — do one thing if true, another if false. Example: if temperature > 30: print(“It’s hot!”) else: print(“It’s normal.”)
- if-elif-else: Check multiple conditions in sequence — Python stops at first true condition. Example: if marks >= 90: print(“A Grade”) elif marks >= 75: print(“B Grade”) elif marks >= 60: print(“C Grade”) else: print(“Better luck next time”)
Easy: “Python reads if-elif-else like reading a menu — takes the first matching dish.”
15. What is the difference between while and for loop?
- while loop: Repeats as long as a condition is True — good when you don’t know how many times it will run. Example: Keep asking password until correct. count = 0 while count < 5: print(count) count += 1
- for loop: Repeats for each item in a sequence (list, range, string) — good when you know the number of times. Example: for i in range(5): print(i) → prints 0 1 2 3 4
Memory tip: “While = wait until stop sign, For = go through every house on street.”
16. How to create and initialize a list in Python? Lists are ordered, changeable collections — like a to-do list. Ways to create:
- Empty: my_list = []
- With values: fruits = [“apple”, “banana”, “cherry”]
- From range: numbers = list(range(1, 6)) → [1, 2, 3, 4, 5]
- Mixed types allowed: mixed = [1, “hello”, True, 3.14]
17. Name some important list methods.
- Add items: append(item) → add at end, insert(pos, item)
- Remove items: remove(value), pop(index or last)
- Change order: reverse(), sort()
- Get info: len(list), count(value), index(value)
- Math: min(), max(), sum() Easy group: “Add → append/insert, Remove → pop/remove, Arrange → sort/reverse, Know → len/count/index”
18. What is a dictionary in Python? Dictionary is an unordered collection of key-value pairs — like a real dictionary (word → meaning) or contact list (name → phone number). Example: student = {“roll”: 101, “name”: “Rohan”, “marks”: 92} Keys must be unique and immutable (usually strings or numbers), values can be anything.
19. How to create, access, update, and delete dictionary elements?
- Create: d = {} or d = dict(name=”Amit”, age=16)
- Access: print(d[“name”]) → Amit
- Update existing: d[“marks”] = 88
- Add new pair: d[“city”] = “Jamshedpur”
- Delete: del d[“age”] or d.pop(“age”) Tip: Use d.get(“key”, “Not found”) to avoid KeyError if key missing.
20. Name dictionary methods and functions.
- keys() → returns all keys
- values() → returns all values
- items() → returns pairs as (key, value) tuples
- update() → add/update from another dictionary
- clear() → remove all items
- pop(key) → remove & return value
- get(key, default) → safe access
- len(d) → number of key-value pairs
21. What is NumPy? How to create NumPy array from list? NumPy (Numerical Python) is a very powerful library for fast mathematical and scientific calculations on large data. Arrays in NumPy are much faster than Python lists. How to use: import numpy as np arr = np.array([10, 20, 30, 40]) # from list Easy: “NumPy = super-fast calculator for big number groups.”
22. What is Pandas? What are Series and DataFrame? Pandas is the most popular Python library for data analysis and manipulation — like Excel on steroids.
- Series: 1-dimensional labeled array (like single column in Excel with labels)
- DataFrame: 2-dimensional table (rows + columns) — like a full Excel sheet Example: Series → student marks, DataFrame → full class result table
23. How to create Series in Pandas? import pandas as pd s = pd.Series([85, 92, 78, 95]) # from list s = pd.Series({“Ram”: 88, “Shyam”: 76}) # from dictionary s = pd.Series(100, index=[“A”, “B”, “C”]) # from scalar value
24. What are head() and tail() in Pandas? Very useful to quickly see data without printing everything.
- df.head(5) → shows first 5 rows (default 5 if no number)
- df.tail(3) → shows last 3 rows Tip: “Head = top of page, Tail = bottom of page”
25. How to import/export data in Pandas? Import (read): df = pd.read_csv(“students.csv”) df = pd.read_excel(“marks.xlsx”)
Export (save): df.to_csv(“new_file.csv”, index=False) df.to_excel(“report.xlsx”)
26. What is Matplotlib? Name some plots you can draw. Matplotlib is Python’s most popular plotting library — used to create graphs, charts, and visualizations. Common plots:
- Line plot (connect points)
- Bar graph (compare categories)
- Histogram (show frequency distribution)
- Scatter plot, pie chart, box plot, etc.
27. How to customize Matplotlib plots? import matplotlib.pyplot as plt plt.plot(x, y) plt.title(“Sales Over Time”) plt.xlabel(“Months”) plt.ylabel(“Revenue”) plt.legend([“Product A”]) plt.grid(True) plt.show() Easy: “Title, labels, legend — make your chart tell a story.”
28. What is a database and DBMS?
- Database: An organized collection of related data (like a digital filing cabinet for student records, marks, attendance).
- DBMS (Database Management System): Software that helps create, manage, update, and query the database safely. Example: MySQL, Oracle, SQLite, PostgreSQL.
29. What is Relational Data Model? Key terms. Relational model stores data in tables (relations). Key terms:
- Tuple = Row (one record)
- Attribute = Column (field like name, roll)
- Domain = Possible values for attribute
- Candidate key = Any column/set that can uniquely identify row
- Primary key = Chosen unique identifier (no null, no duplicate)
- Alternate key = Other candidate keys not chosen as primary
30. What are DDL, DQL, DML in SQL?
- DDL (Data Definition Language): Define structure — CREATE, ALTER, DROP
- DQL (Data Query Language): Retrieve data — SELECT
- DML (Data Manipulation Language): Modify data — INSERT, UPDATE, DELETE Mnemonic: “DDL = Design, DQL = Display, DML = Do changes”
31. Name some MySQL data types. Common ones:
- Numeric: INT, FLOAT, DECIMAL
- Text: CHAR(n), VARCHAR(n), TEXT
- Date/Time: DATE, TIME, DATETIME
- Others: BOOLEAN, BLOB (for images/files)
32. Write SQL to create database and table. CREATE DATABASE school; USE school;
CREATE TABLE student ( roll_no INT PRIMARY KEY, name VARCHAR(50) NOT NULL, class CHAR(3), marks FLOAT );
33. What is SELECT query with WHERE clause? SELECT is used to retrieve data. Basic: SELECT * FROM student; With condition: SELECT name, marks FROM student WHERE marks > 80; SELECT * FROM student WHERE class = ‘XII’;
34. Explain BETWEEN, IS NULL, logical operators in SQL.
- BETWEEN: range inclusive → marks BETWEEN 60 AND 90
- IS NULL / IS NOT NULL: check for empty values
- Logical: AND (both true), OR (any true), NOT (reverse) Example: SELECT * FROM student WHERE marks BETWEEN 70 AND 85 AND class = ‘XI’;
35. Name math functions in SQL. POWER(base, exponent) → POWER(2,3) = 8 ROUND(number, decimals) → ROUND(45.678, 1) = 45.7 MOD(dividend, divisor) → MOD(10,3) = 1
36. Name text functions in SQL. UPPER() / LCASE() → convert case LENGTH() → number of characters LEFT(string, n) → first n chars RIGHT(string, n) → last n chars TRIM() / LTRIM() / RTRIM() → remove spaces
37. Name date functions in SQL. NOW() → current date & time DATE() → extract date part MONTH(), MONTHNAME() YEAR(), DAY(), DAYNAME() Example: SELECT MONTHNAME(NOW()); → January (if current month)
38. What are aggregate functions in SQL? They perform calculation on multiple rows and return single value. MAX(), MIN(), AVG(), SUM(), COUNT() COUNT(*) → total rows COUNT(column) → non-null values
39. What is GROUP BY, HAVING, ORDER BY?
- GROUP BY: Groups rows with same value → SELECT class, AVG(marks) FROM student GROUP BY class;
- HAVING: Filter groups (like WHERE for groups) → HAVING AVG(marks) > 75
- ORDER BY: Sort result → ORDER BY marks DESC
40. What is equi-join? Join two tables where values in common column are equal. Example: SELECT s.name, c.course FROM student s, course c WHERE s.course_id = c.course_id;
41. What are types of networks?
- PAN (Personal Area Network): Very small, e.g., Bluetooth devices around you
- LAN (Local Area Network): Small area like school/lab
- MAN (Metropolitan Area Network): City-wide, e.g., cable TV network
- WAN (Wide Area Network): Large, e.g., Internet
42. Name network devices.
- Modem: Connects to internet
- Hub: Basic connector (broadcasts to all)
- Switch: Smart hub (sends only to correct device)
- Repeater: Boosts signal
- Router: Connects different networks, directs traffic
- Gateway: Connects dissimilar networks
43. What are network topologies? Physical or logical layout of network.
- Star: All devices connect to central hub/switch (most common)
- Bus: Single cable backbone
- Tree: Hierarchical (combination of star + bus)
- Mesh: Every device connected to every other (very reliable but expensive)
44. What is Internet, URL, WWW?
- Internet: Global network of networks
- URL (Uniform Resource Locator): Web address, e.g., https://www.cbse.gov.in
- WWW (World Wide Web): System of interlinked web pages accessed via HTTP/HTTPS
45. Difference between website and webpage? Static vs dynamic.
- Webpage: Single document/page (like one page of book)
- Website: Collection of many webpages (whole book)
- Static webpage: Content fixed (doesn’t change unless edited manually)
- Dynamic webpage: Content changes based on user, time, database (e.g., Amazon product page)
46. What are web browsers? Name some. Web browser is software that lets you view websites and surf the internet. Popular ones: Google Chrome, Mozilla Firefox, Microsoft Edge, Safari, Opera, Brave.
47. What is digital footprint? Every activity you do online leaves a trace — posts, likes, searches, location data, photos, comments. Two types: Active (what you share yourself), Passive (data collected about you). Remember: “What you post today can be seen forever.”
48. What are net etiquettes? Rules of polite behavior online (also called netiquette). Examples: Don’t type in ALL CAPS (looks like shouting), respect others’ privacy, don’t spam, be kind in comments, don’t share fake news.
49. What is IPR, plagiarism, FOSS?
- IPR (Intellectual Property Rights): Legal rights over creations (copyright, patent, trademark)
- Plagiarism: Copying someone else’s work/idea without credit — cheating
- FOSS (Free and Open Source Software): Software you can use, modify, share freely (e.g., Linux, Python, LibreOffice)
50. Name some cybercrimes. Hacking (unauthorized access), Phishing (fake emails to steal info), Cyber bullying (online harassment), Ransomware (locks files and demands money), Identity theft.
51. What is E-waste management? E-waste = discarded electronics (old phones, computers, batteries). Proper management: Recycle responsibly, don’t throw in regular dustbin (toxic chemicals leak), use authorized collection centers. Remember: “Old gadgets are not garbage — they are resources if recycled.”
52. Name emerging trends. Artificial Intelligence (AI), Machine Learning (ML), Natural Language Processing (NLP), Augmented Reality (AR) & Virtual Reality (VR), Robotics, Big Data, Internet of Things (IoT), Cloud Computing (SaaS, IaaS, PaaS), Blockchain.
53. What is Artificial Intelligence? AI is when machines/computers do tasks that normally need human intelligence — learning, understanding language, recognizing images, making decisions. Examples: Siri, Google Maps route suggestion, face unlock on phone.
54. What is IoT? Give example. IoT (Internet of Things) = everyday objects connected to internet so they can send/receive data. Examples: Smart bulb you control from phone, fitness band tracking steps, smart fridge that orders milk when low.
55. What is Cloud Computing? Types of services. Cloud Computing = using someone else’s powerful computers over internet instead of your own machine. You pay only for what you use — like electricity bill. Main types:
- SaaS (Software as a Service): Ready apps (Gmail, Google Docs)
- IaaS (Infrastructure as a Service): Virtual machines/storage (Amazon AWS EC2)
- PaaS (Platform as a Service): Tools to build apps (Google App Engine)
All the best for your Class 11 viva! Read each answer 2–3 times, explain in your own words, and practice with code examples where possible. You’ve got this!
