1. What is a character set in Python?
Ans :- The set of valid characters that Python recognizes for writing programs, including letters, digits, and symbols.
Â
2. List some commonly used characters in Python.
Ans :- Letters (a-z, A-Z), digits (0-9), special symbols (+, -, *, /), and whitespace characters (space, tab, newline).
Â
3.Is Python case-sensitive? Â
Ans :-Â Yes, Python distinguishes between uppercase and lowercase letters.
Â
4. What is the use of whitespace in Python?**Â Â
Ans :- Whitespace is used for indentation and separating tokens.
Â
5. What are tokens in Python?Â
Ans :- Tokens are the smallest units of a program, such as keywords, identifiers, literals, operators, and punctuators.
Â
6.What are Python keywords? Â
Ans :- Reserved words in Python with special meanings (e.g., `if`, `else`, ‘while’, ‘for’, etc.).
Â
7. What is an identifier?
Ans :- A name used to identify variables, functions, or classes.
8. What are literals in Python? Â
Ans :- Fixed values in a program, such as numbers (`123`), strings (`”Hello”`), or booleans (`True`, `False`).
9.What are operators?
Ans :- Symbols used to perform operations (e.g., `+`, `-`, `*`, `/`, `==`).
10. What are punctuators in Python?Â
Ans :- Symbols like `,`, `:`, `[]`, `{}`, used to structure code.
11. What are the components of a basic Python program? Â
Ans :- Comments, statements, functions, and blocks.
12. What is the significance of indentation in Python?Â
Ans :- Indentation defines the block of code and is mandatory for structuring.
13. How do you write comments in Python?
Ans Single-line comments use `#`. Multi-line comments use triple quotes (`”””` or `”’`).
14. What is the main function in Python?Â
Ans :- It’s the entry point for execution, written as:Â Â
   if __name__ == “__main__”:
main()
 15. What is a variable in Python?Â
Ans :- A name that refers to a value stored in memory.
16. How do you assign a value to a variable? Â
Ans :- Using the assignment operator `=`.  x = 10
17. What are dynamic variables?Â
Ans :- Variables that can change their type during runtime in Python.
18. Can variable names start with a number?Â
Ans :- No, variable names must start with a letter or underscore.
19. What is multiple assignment?
Ans :- Assigning multiple variables in a single line.  a, b, c = 1, 2, 3
20. How do you take input from the user in Python?
Ans :- input_value = input(“Enter something: “)
21. What is the default type of `input()`? Â
Ans :- String.
22. How do you print output in Python?**Â Â
Ans :- print(“Hello, World!”)
23. How can you format strings in `print()`? Â
Ans :- Using `f-strings` or `.format()`. Â
print(f”My name is {name}”)
24. What are Python’s basic data types? Â
Ans :- `int`, `float`, `str`, `bool`, `list`, `tuple`, `set`, `dict`.
25. What is the difference between `list` and `tuple`?Â
Ans :- `list` is mutable; `tuple` is immutable.
26. What is a dictionary in Python?Â
Ans :- A collection of key-value pairs. Â
d = {“name”: “Alice”, “age”: 25}
27. What are mutable data types? Â
Ans :- Data types that can be modified (e.g., `list`, `dict`, `set`).
28. What are immutable data types? Â
Ans :- Data types that cannot be modified (e.g., `int`, `float`, `tuple`, `str`).
29. What is an expression in Python?
Ans :- A combination of variables, operators, and values that evaluates to a result.
30. What is the result of `2 + 3 * 4` in Python?Â
Ans :- `14`, because of operator precedence.
31. What is type conversion?Â
Ans :- Converting one data type into another.  int(“123”)
32. What is the difference between implicit and explicit conversion?**Â Â
Ans :- Implicit is done automatically by Python; explicit requires manual conversion.
33. What are Python statements?
Ans :- Instructions executed by Python (e.g., assignment, conditional, loop).
34. What is a compound statement?Â
Ans :- A statement that contains multiple instructions, like `if`, `for`, `while`.
35. What are IDEs, and give examples? Â
Ans :- Integrated Development Environments, such as PyCharm, Jupyter, and VS Code.
36. What are control structures in Python? Â
Ans :- Constructs like `if`, `for`, and `while` that control the flow of execution.
37. What is the syntax of an `if` statement? Â
Ans :- if condition:
 38.What is the difference between `for` and `while` loops?Â
Ans :- `for` is used for iterating over a sequence; `while` is used for repeated execution based on a condition.
39. What are jump statements in Python? Â
Ans :- Statements like `break`, `continue`, and `pass` that alter the flow of execution.
40.What does the `break` statement do? Â
Ans :- Exits the current loop prematurely.