PYTHON VIVA
CLASS 9th
Variable – What is a variable in Python?
Answer: A named memory location to store data.String – What is a string?
Answer: A sequence of characters enclosed in quotes.Integer – What is an integer?
Answer: A whole number without a decimal.Float – What is a float?
Answer: A number with a decimal point.Boolean – What is a Boolean?
Answer: A data type with True or False value.If – What does
if
do?
Answer: Checks a condition and runs code if true.Else – What does
else
do?
Answer: Runs code when theif
condition is false.Elif – What is
elif
?
Answer: “Else if” used for multiple conditions.Break – What is
break
used for?
Answer: To exit a loop immediately.Continue – What is
continue
used for?
Answer: To skip the current iteration of a loop.Import – What does
import
do?
Answer: Includes a module in the program.Module – What is a module?
Answer: A file containing Python code and functions.Comment – What is a comment?
Answer: Text ignored by Python, used for explanations.Input – What is
input()
?
Answer: A function to take user input.Output – How do you show output in Python?
Answer: Using theprint()
function.