and Answers Graded A+
What is Python?
✔✔Python is a high-level, interpreted programming language known for its simplicity and
readability.
How do you print "Hello, World!" in Python?
✔✔By using the command: `print("Hello, World!")`
What is a variable in Python?
✔✔A variable is a name used to store data or values in a program.
How do you create a comment in Python?
✔✔By using the `#` symbol before the text.
What is the purpose of indentation in Python?
✔✔Indentation defines blocks of code and is mandatory for the structure of Python programs.
1
, How do you define a function in Python?
✔✔By using the `def` keyword followed by the function name and parentheses.
What is the use of the `if` statement in Python?
✔✔It is used to make decisions based on conditions.
How do you create a list in Python?
✔✔By enclosing elements in square brackets, like this: `[1, 2, 3]`.
What is a tuple in Python?
✔✔A tuple is an immutable collection of items, created using parentheses, like this: `(1, 2, 3)`.
How do you check the type of a variable in Python?
✔✔By using the `type()` function.
What is the difference between `=` and `==` in Python?
✔✔`=` is used for assignment, while `==` is used for comparison.
2