Python Computer Abcd
Python Computer Abcd
Assignment1
3. State any six reasons, why you must consider writing software applications in Python.
6. State which of the following python statements are valid and invalid.
a. print("ksk", + "123")
e. print(2 + '3')
f. print('2' * 3)
a. print('abc' * 2)
b. print(3+4j + 2+1j)
c. print(3*2 // 4)
a. a = 55
b. b = ‘3 + 4j’
c. c = “1DBATU”
d. d = 5 + 2j
e. e = a
f. f = b+c
9. Explain any six arithmetic operators of python with suitable examples of each.
10. Explain any six assignment operators of python with suitable examples of each.
11. Explain all comparison operators of python with suitable examples of each.
12. Explain “and, or, not” operators of python with suitable examples of each.
13. Explain all bitwise operators of python with suitable examples of each.
14. Explain while loop with suitable example?
15. Differentiate between List, Tuple & Set with suitable examples of each.
16. Explain any three collection data types of Python with suitable examples of each.
17. Explain append() and copy() methods of list with suitable examples of each.
18. Explain count() and index() methods of list with suitable examples of each.
19. Explain insert() and remove() methods of list with suitable examples of each.
20. Explain reverse() and remove() methods of list with suitable examples of each.
21. Explain clear() and extend() methods of list with suitable examples of each.
22. Explain pop() and sort() methods of list with suitable examples of each.
a. print(23 // 5)
b. print(2 << 2)
c. print(2 >> 0)
d. print(2 ^ 2)
e. print(2 != 2)
f. print(2 < 0)