Page 212 - AI Ver 1.0 Class 10
P. 212
3. Which of the following identifiers are invalid? Give reasons.
a. else b. My house
c. #number d. Class1
e. firstname f. Full Name
g. Rollno
B. Long answer type questions:
1. What is the difference between?
a. else and elif construct of if statement. b. for and while loop.
c. print() and input(). d. sep and end in print().
e. // and / arithmetic operators. f. Comparison and logical operators.
2. What are Python keywords? Explain the use of the following keywords- def, sep, if, int.
3. Define indentation in Python. Why is it important?
4. How are multiple assignments made in Python?
Lab Computational Thinking
Write a Python code for the following.
a. Input radius and calculate the area and circumference of a circle.
b. To find the average of 3 numbers.
c. Print the highest of three numbers entered.
d. Print the even numbers between 21–50.
e. Print “HELLO” in reverse order.
f. Input age and check whether eligible for driving or not.
g. Input 5 numbers and print its sum.
h. Input a number and print your name that many times.
Answers
Exercise (Section A)
A. 1. b 2. c 3. a 4. a 5. b 6. b 7. a 8. c 9. c 10. d
11. b 12. d 13. b 14. b 15. c 16. c 17. a 18. d
B. 1. Navigator 2. Jupyter Notebook 3. virtual environment
4. Kernel 5. Notebook 6. cell
7. statements 8. enter key 9. Single line comment
10. loop
C. 1. False 2. True 3. False 4. True 5. True
D. 1. d 2. a 3. c 4. e 5. b
210 Touchpad Artificial Intelligence-X

