Skip to content

fenyx-it-academy/Class6-Python-Module-Week2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Class6-Python-Module-Week2

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)

4.Hackerrank

  1. https://www.hackerrank.com/challenges/list-comprehensions/problem
  2. https://www.hackerrank.com/challenges/python-tuples/problem
  3. https://www.hackerrank.com/challenges/nested-list/problem (edited) .

Good luck!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors