Page 436 - ComputerScience_Class_11
P. 436
3. Why are keywords called reserved words in programming?
4. What are the different types of tokens in Python?
5. List some uses of multi-line comments in Python.
6. Define Python IDLE and name its two modes of operation.
7. What are literals in Python and what are the different types of literals?
8. What are L-value and R-value in Python? Give an example.
9. Define punctuators in Python and list their types with examples.
10. What is PyCharm IDE used for in Python programming?
D. Higher Order Thinking Skills (HOTS)
1. A programmer is confused while writing a Python program because they are not sure whether to use double quotes (" ")
or triple quotes (""" """) for messages and explanations. Explain how they should use double quotes and triple quotes in this
situation.
2. A student notices errors in their Python program for calculating monthly expenses. They are unsure where the mistake is in the
code. Explain how debugging and testing features in an IDE can help identify and fix these errors, ensuring the program works
correctly.
E. Case study-based questions.
In a practical class, students wrote a Python program to store and display names in a list. One forgot commas between items,
another misused the print format and a third skipped curly braces in a dictionary. The teacher explained that punctuators are
important symbols that help structure Python code correctly and mistakes in using them cause errors.
Based on the given case, answer the following questions:
1. Why are punctuators important in Python programs?
2. What mistake did the first student make while writing the list?
3. What error did the second student make in the print statement?
4. What mistake did the third student make while creating the dictionary?
F. Write the Python program for the following:
1. Write a Python program to create variables to store your name, age and class display them.
2. Write a Python program to calculate the area and perimeter of a rectangle using variables and arithmetic operators.
3. Write a program to calculate the sum of two numbers and include comments describing each step.
G. Find the output of the following programs:
1. x = 8
y = 3
print(x * y)
2. _Name = "Rahul Sharma"
print(_Name)
class = 12
print(class)
3. fruits = ["Apple", "Mango", "Banana"]
print(fruits)
color = ("Red", "Blue", "Pink", "Orange")
print(color)
434 Touchpad Computer Science (Ver. 3.0)-XI

