The Joy of Computing using Python Week 3: Programming Assignment - Jun-Dec 2021

 NPTEL PROGRAMMING ASSIGNMENTS


The Joy of Computing using Python


Week 3: Programming Assignment 1 - Area of a rectangle

Due on 2021-08-26, 23:59 IST

Write a program to accept the length and breadth of a rectangle and print its area.

Input Format:

Single line of input contains two numbers indicating the length and breadth

Output Format:

Display the area of a rectangle corresponding to the input

Example:

Input:

3 5

Output:

15

 

Week 3: Programming Assignment 2 - Smallest and Largest

Due on 2021-08-26, 23:59 IST

Write a program that takes 3 integers as input and prints the difference between the largest and smallest value among the three.

Input Format:

Single line of input contains three numbers 

Output Format:

Print the value after subtracting the smallest number from the largest

Example:

Input:

5 7 9

Output:

4

 

 


Week 3: Programming Assignment 3 - Right angled Triangle

Due on 2021-08-26, 23:59 IST

Write a program that takes 3 integers as input and checks whether they can form the sides of a right angled triangle or not. Print YES if they can form a right angled triangle. NO, otherwise.

Input Format:

Single line of input contains three numbers 

Output Format:

Print YES or NO

Example:

Input:

5 4 3

Output:

YES

Example:

Input:

10 20 30

Output:

NO

 


Post a Comment (0)
Previous Post Next Post