PWP Assignment
PWP Assignment
2. Create a list name num to value[0 to 11] For the given list write the output:
a) >>>num[1:10:2]
b) >>>num[10:]
c) >>>num[0::2]
d) open all the multiples of iii from the list num
11. write the Python program to find the index of maximum and minimum value
in the tuple.
12. Write the Python program to count the numbers of each characters in the
given string and store them in the dictionary data structure.
13. Write a python program to check for the values of existing key in the
dictionary continue the process in the user’s enter small Y and Capital Y.
14. Write a Python program to count unique items in tuple.
15. Write a python program to count the frequency of elements in the list using
the dictionary.
16. Write a pattern program that demonstrates use of python string operators.
17. Explain the slicing on the string.
18. Write python program by using these all set comparison operators
== , != , >= , <=
19. Write output for following
>>> a = {1,2,3,4}
>>> b = {4,5,6}
>>> c = a | b
>>> print(c)
>>> d = a & b
>>>print(d)
>>>e = a - b
>>>print(e)
>>>f = a ^ b
>>>print(f)
>>>print(a.isdisjoint(b))
>>>print(a.symmetric_differ(b))
>>>print(a.intersection_update(b))
>>>print(a.summetric_difference-update(b))