1. Write a Python program which executes following rules on this given list => numbers = [2, 3, 5, 7, 11, 13, 17, 19]
-take an input(number) from the user
-take out the first element of the list and put it at the end. Do this x times that in the first step the user indicated.
-print the list
-(OPTIONAL) make sure there is not an error while taking input
2. Write a Python program that returns the following dictionary with sorted values. NOTE: Dictonaries have keys and values. Here the values are lists. So, the returned dictonary should have sorted values(list)
data = { 'a': [5, 3, 9, 0, 2, 3, 1], 'b': [4, 7, 5, 1, 2], 'c': [8, 1, 3, 2, 4] }
3. Write a Python program that returns a dictionary which consists the unique elements in the following tuple as keys and the number of occurrences of elements as values.
tuple1 = (20, 10, 60, 70, 50, 20, 80, 20, 10, 20, 60, 60, 50)
- https://www.hackerrank.com/challenges/list-comprehensions/problem
- https://www.hackerrank.com/challenges/python-tuples/problem
- https://www.hackerrank.com/challenges/nested-list/problem (edited) .
Good luck!