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

    NPTEL PROGRAMMING ASSIGNMENTS

The Joy of Computing Using Python

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

Given a list L containing integers, write a program that creates and prints a dictionary 'd' containing all the the numbers that occur twice or more in the list as keys and their indexes as values. Both the keys are and their values should be in the same order as given the list.    

Input Formate:
  List
Output Formate:
 Dictionary

Input:
[2, 2, 2, 1, 1, 1]

Output:
{2: [0, 1, 2], 1: [3, 4, 5]}


the joy of computing using python


 

  



Week 6 Programming Assignment 2
Last Day of Submission: 8-Sep-2022

Romeo wants to send a message to Juliet and also don't want anyone to read it without his permission. So he shifted every small letter in the sentence by -2 position and every capital letter by -3 position. If the letter is c, after shifting to by -2 position it changes to a, and for D new letter will be A. 
Write a program to help Romeo which prints the encrypted message.

Input Formate:
  String
Output Formate:
 Encrypted String


Input
Apple

Output
Xnnjc


the joy of computing using python



 

  



Week 6 Programming Assignment 3
Last Day of Submission: 8-Sep-2022

Take a string S as an input and print 'palindrome' if string S is a palindrome or 'not palindrome' if string S is not a palindrome.
A palindrome is a word which spells same from forward and backward.

Input Formate:
  String
Output Formate:
 palindrome or not palindrome


Input
 SAS

Output
 palindrome


the joy of computing using python


 

  


Post a Comment (0)
Previous Post Next Post