SANSKAR COLLEGE OF ENGINEERING AND TECHNOLOGY
Course: [Link] Semester- 3rd
Subject: Python Programming Subject Code: BCC302
ASSIGNMENT NO. – 3 A
1) What is string? List any three string function with example.
2) Write difference between mutable & immutable object.
3) Explain built in function of python like Len(), min() , max(), Sum(), sorted() with
example.
4) Explain string in python. Discuss indexing, slicing and string method with example.
5) What is user defined function. Explain steps to create an call function with example.
ASSIGNMENT NO. – 3 B
1. Write a program to calculate the power of a number without using built-in functions.
2. Write a program to reverse a string.
3. Write a program to count occurrences of each character in a string.
4. Write a program to find the length of a string without using len().
5. Write a program to sort a list in ascending order without using sort().
6. Write a program to repeat a tuple n times.
7. Write a program to get only keys or only values of a dictionary.
8. Write a program to create a dictionary and display it . And also add a new key-value
pair in a dictionary.
9. Write a program to update the value of an existing key, delete a key from the
dictionary and check whether a key exists in the dictionary.
10. Write a program to find the index of an element and to slice a tuple.