The viva carries marks in the CBSE Class 11 Computer Science practical, and it is the part students prepare least. Below are 15 questions examiners actually ask, grouped by topic, each with a short answer you can say out loud.
Python basics
1. What is the difference between a keyword and an identifier?
Answer: A keyword is reserved by the language, such as if or while. An identifier is a name the programmer chooses for a variable or function, and it cannot be a keyword.
2. Name the mutable and immutable types you have studied.
Answer: Mutable: list, dictionary, set. Immutable: int, float, string, tuple.
3. What is the difference between = and ==?
Answer: = assigns a value. == compares two values and gives True or False.
4. What is the difference between / and // ?
Answer: / gives a float result. // gives floor division, discarding the fractional part.
5. What is type conversion?
Answer: Changing a value from one type to another. Implicit conversion is done by Python itself; explicit conversion is done with int(), float() or str().
Control flow
1. What is the difference between a while loop and a for loop?
Answer: A for loop runs over a known sequence. A while loop repeats as long as a condition stays true, so the number of runs need not be known in advance.
2. What do break and continue do?
Answer: break leaves the loop entirely. continue skips the rest of the current pass and goes to the next one.
3. What is an infinite loop?
Answer: A loop whose condition never becomes false, so it never stops. It usually means the counter was not updated.
Strings, lists and dictionaries
1. What does string slicing do?
Answer: Returns a portion of the string. s[1:4] gives characters at positions 1, 2 and 3; the end position is not included.
2. Why are strings called immutable?
Answer: Because an existing string cannot be changed in place. Any operation that looks like a change actually builds a new string.
3. What is the difference between append() and extend()?
Answer: append() adds its argument as a single element. extend() adds each item of the argument separately.
4. How do you safely read a key that might not exist in a dictionary?
Answer: Use get(), which returns None, or a default you supply, instead of raising KeyError.
Computer systems
1. What is the difference between RAM and ROM?
Answer: RAM is volatile working memory that loses its contents when power goes off. ROM is non-volatile and keeps its contents.
2. What is system software?
Answer: Software that runs the machine itself, such as the operating system and compilers, as opposed to application software that does a user's task.
3. What is the difference between a compiler and an interpreter?
Answer: A compiler translates the whole program before it runs. An interpreter translates and runs it line by line, which is how Python works.
Written by Kajal Ma'am (MCA), teaching computer subjects since 2004.
Please read: these are practice questions written by Kwickprep to help you revise. They are not past examination papers and not a CBSE publication. Questions asked in your school’s viva or examination may differ, and the syllabus can change between sessions — the board’s own document at cbseacademic.nic.in is always the final word. Tell us if you spot a mistake and we will correct it.