NPTEL PROGRAMMING ASSIGNMENTS
The Joy of Computing Using Python
Week 4 Programming Assignment 1
Last Day of Submission: 25-Aug-2022
Take two numbers N and K as an input. Create a list L of length N and initialize it with zeros. Change the value to 1 of even indexes if k is even, otherwise change the value of odd indexes. Print list L in the end.(Consider 0 as even)
Input Formate:
Two numbers K and N
Output Formate:
list 'a'
Input:
4
4
2
Output:
Week 4 Programming Assignment 2
Last Day of Submission: 25-Aug-2022
Write a program to take string S as an input and replace all vowels by *. Also print the modified string.
Input Formate:
string A
Output Formate:
modified string
Input
simple
Output
Input
simple
Output
s*mpl*
Week 4 Programming Assignment 3
Last Day of Submission: 25-Aug-2022
Write a program to take an integer N as an input and display the pattern.
Input Formate:
Number
Output Formate:
Pattern
Input
Input
4
Output
*
* *
* * *
* * * *
* * *
* *
*