Assignment Day 7 - 28th July 2020
Assignment Day 7 - 28th July 2020
For any doubts regarding the assignment, ask questions in the Python Group
in the Community.
Submit Assignments by 29th July 2020 11:00 AM.
Question 1 :
Use the dictionary,
port1 = {21: "FTP", 22:"SSH", 23: "telnet", 80: "http"},
and make a new dictionary in which keys become values and values become keys,
as shown: Port2 = {“FTP":21, "SSH":22, “telnet":23,"http": 80}
Question 2:
Take a list of tuple as shown below.
[(1,2), (3,4), (5,6),(4,5)]
Make a new list which contains the sum of the number of tuples.
For example
Input
[(1,2), (3,4), (5,6)]
Output
[3, 7, 11]
Python Essentials | Batch 6
Question 3:
Take a list as shown below
[(1,2,3), [1,2], ['a','hit','less']]
The List contains tuple and lists. Make the elements of inner lists and tuples to outer list
FAQs
Q. Can we submit multiple .py or .ipynb assignment solution files for each
question separately?
A. You can zip all the files together and submit. Make sure you are submitting a single file.