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

  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
2

Output:
[1, 0, 1, 0]


the joy of computing using python




 

 



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
s*mpl*



the joy of computing using python



 

 



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
4

Output

*
* *
* * *
* * * *
* * *
* *
*


the joy of computing using python



 

 


Post a Comment (0)
Previous Post Next Post