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

      NPTEL PROGRAMMING ASSIGNMENTS

The Joy of Computing Using Python

Weekk 9 Programming Assignment 1
Last Day of Submission: 29-Sep-2022

Given two strings s1 and s2, write a function subStr that accepts two strings s1 and s2 and will return True if a s2 is a substring of s1 otherwise return False.

Input Formate:
  string
Output Formate:
 Boolean

Input:
alpha
al

Output:
True


the joy of computing using python




 

  



Week 9 Programming Assignment 2
Last Day of Submission: 29-Sep-2022

Given two dictionaries d1 and d2, write a function mergeDic that accepts two dictionaries d1 and d2 and return a new dictionary by merging d1 and d2. 


Input Formate:
  dictionary
Output Formate:
 dictionary


Input
  {1: 1, 2: 2}
 {3: 3, 4: 4}

Output
  {1: 1, 2: 2, 3: 3, 4: 4}


the joy of computing using python




 

  



Week 9 Programming Assignment 3
Last Day of Submission: 29-Sep-2022

Given an integer n, print all the indexes of numbers in that integer from left to right.    

Input Formate:
  number
Output Formate:
 pattern

Input
 122345

Output
 
1 0 
 2 1 2
 3 3
 4 4
 5 5


the joy of computing using python




 

  


Post a Comment (0)
Previous Post Next Post