Worksheet5(on Python)
Worksheet5(on Python)
PYTHON
Objective Questions (MCQs)
set1 = {1, 2, 3, 4, 4}
print(set)
A. {1, 2, 3, 4, 4}
B. {1, 2, 3, 4}
C. {4, 4, 3, 2, 1}
D. No output
1. What is the difference between dynamic typing and static typing? Give one example of each.
2. Explain the concept of indentation in Python and its importance in defining code blocks.
3. How do you declare a variable in Python? Give examples of string, integer, and float
variables.
4. What will be the output of the following code? Explain your answer.
x = "Aman"
y=x/2
5. Define and differentiate between mutable and immutable data types in Python with examples.