You are on page 1of 1

DATA505_PRP : Assignment 2

1. Initialize a list, L with 20 elements [100, 20, 8, 100, 13, 20, 5, 6, 90, 77, 4, 29, 33, 21,
-88, -15, 4,6, 77, 100]. Write a python program to remove duplicate elements in the
list, L.

2. Password authentication is usually performed while signing into platforms such as


Gmail, Canvas, LinkedIn etc. Write a python program to verify if the password entered
by a user complies with the conditions as below and display a message “Password is
acceptable”. In case, the password does not meet the given criteria, then display the
message, “Password is NOT acceptable because ……….”
a. The total number of characters entered should range between 6 to 10 only.
b. The password should not begin with number or special characters like #,@,_

3. Write a python program to count the number of times character ‘a’ occurs in a
word/sentence/paragraph entered by user.

4. Write a Python program to verify if a tuple entered by user is a Fibonacci sequence up


until the nth term.
Example :

5. Write a Python program to identify duplicate dictionary entries.


Example: The capital ‘Mumbai’ is mapped for two states (Kerala and Maharashtra)

----------------------------------------------------------------

You might also like