NPTEL The Joy Of Computing Using Python Week 12 Programming Assignment | NPTEL Swayam Assignment Answers
Nptel Week 12 Programming Assignment Answers:
Q.1: Write a program to take an integer as the input and reverse that integer.
Input:
A single integer.
Output:
Reverse number of that integer.
Example:
Input:
54321
Output:
12345
Q.2: Take a list of strings as an input and write a program to write sort the list of strings on the basis of last character of each string.
If last character is same, consider the second last character and so on.
Input:
L = ['ram', 'shyam', 'lakshami']
Output:
['lakshami', 'ram', 'shyam']
Q.3: Take a student's email id as an input in the format rollNumber@institute.edu.in and write a program to find the roll number and institute name of the student.
Input:
roll@institute.edu.in
Output:
roll institute
0 Comments