Class 12 CS Homework
Class 12 CS Homework
SECTION A
1. “Welcome‟ is ___________literals
2. $ symbol can be used in naming an identifier (True/False)
3. Write any 2 data types available in Python.
4. range(1,10) will return values in the range of to
5. randint(1,10) will return values in the range of to
(ii)
for i in range( ):
print(i)
11. Which is the valid dictionary declaration?
I) d1={1:'January',2='February',3:'March'}
II) d2=(1:'January',2:'February',3:'March'}
III) d3={1:'January',2:'February',3:'March'}
IV) d4={1:January,2:February,3:March}
12. What is the value of x? >>>x = int (8/3+5)
13. What is the output of the following code?
>>>print(“Good”, “Morning”)
1|Page
14. What will be the output of following code?
>>> s= [6,5,4,7,8,5]
>>>a.remove(5)
>>>a
15. What will be the output of following program?
1. What is type conversion in Python? What are different types ofconversion? Illustrate with
example.
2. Write a program to enter any number and check it is divisible by 7 or not.
3. Explain about the tokens in python programming languages
4. What is an identifier ?what are the rules for declaring the identifiers
5. What are the key words in python programming languages?
6. What are the operators in python programming language?
7. What are the features of python programming language?
8. Write a python program to check the person is eligible or not?
9. Write a Python Program to Calculate the Area of a Triangle.
10. Python Program to Find the Factorial of a Number.
11. Explain about the conditional statements in python with flow charts?
12. Write a Python Program to find the largest of three numbers.
13. Write a python program to reverse the given number using while loop.
14. Write a python program to Check Prime Number or not.
15. Write a Python Program to check if a Number is Odd or Even.
2|Page