The Joy of Computing using Python Week 5: Programming Assignment - Jul-Dec 2022

   NPTEL PROGRAMMING ASSIGNMENTS

The Joy of Computing Using Python

Week 5 Programming Assignment 1
Last Day of Submission: 1-Sep-2022

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 Formate:
  String
Output Formate:
 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}


the joy of computing using python



 

  



Week 5 Programming Assignment 2
Last Day of Submission: 1-Sep-2022

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.

Input Formate:
  list L
Output Formate:
 Unique List


Input
[1, 2, 3, 2, 5, 6]

Output
[1, 3, 5, 6]


the joy of computing using python




 

  



Week 5 Programming Assignment 3
Last Day of Submission: 1-Sep-2022

You are given a list L. Write a program to print first prime number encountered in the list L.

Input Formate:
  list L
Output Formate:
 Number


Input
[1, 2, 3, 4, 5]

Output
2


the joy of computing using python


 

  


Post a Comment (0)
Previous Post Next Post