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
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}
Output
Input
{1: 1, 2: 2}
{3: 3, 4: 4}
Output
{1: 1, 2: 2, 3: 3, 4: 4}
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
Input
122345
Output
1 0
2 1 21 0
3 3
4 4
5 5