Week 5 Programming Assignment Solutions | The Joy of Computing using Python
The Joy of Computing using Python | Week 5 Programming Assignment Solutions | NPTEL | Swayam
The Joy of Computing using Python : Week 5 Programming Assignments | NPTEL
Hi Everyone,
Welcome to "Simple Edu Talk" Channel.
Here I will provide for you NPTEL THE JOY OF COMPUTING USING PYTHON All Assignment Quiz Answers.
So please subscribe this channel and press the bell icon to get new video Notification first and then you can watch new assignment answers video.
#nptel #thejoyofcomputingusingpython #python
Website Link : https://nptelcodes.blogspot.com/
All Codes Link:(1) https://nptelcodes.blogspot.com/2022/...
(2) https://edugyantech.blogspot.com/2022...
TOPIC
Week 5: Programming Assignment 1
You are given a string S. Write a function count_letters which accepts the string S and returns a dictionary containing letters (including special character) in string S as keys and their count in string S as values.
(input and output is handled by us, you just need to write the function and return the dictionary)
Input
The Joy of computing
Output
{'T': 1, 'h': 1, 'e': 1, ' ': 3, 'j': 1, 'o': 3, 'y': 1, 'f': 1, 'c': 1, 'm': 1, 'p': 1, 'u': 1, 't': 1, 'i': 1, 'n': 1, 'g': 1}
Week 5: Programming Assignment 2
You are given a list L. Write a function uniqueE which will return a list of unique elements is the list L in sorted order. (Unique element means it should appear in list L only once.)
Input is handled by us.
Input
[1,2,3,3,4,4,2,5,6,7]
Output
[1,5,6,7]
Explanation
Elements 1,5,6,7 appears in the input list only once.
Week 5: Programming Asiignment 3
You are given a list L. Write a program to print first prime number encountered in the list L.(Treat numbers below and equal to 1 as non prime)
Input is handled by us.
Input
[1,2,3,4,5,6,7,8,9]
output
2
Explanation
Since 2 is the first prime number is list L, therefor it is printed.
Follow Us:-
Telegram Channel Link..
https://t.me/simpleedutalk
Facebook:-
/ simpleedutalk
Twitter:-
/ simpleedutalk1
Thank you 🌹🌹
#simpleedutalk #NPtelJoyWeek2programming #Joyweek2programminganswers