NPTEL PROGRAMMING ASSIGNMENTS
The Joy of Computing Using Python
Weekk 5 Programming Assignment 1
Last Day of Submission: 2-Mar-2023
Write a Python program that finds the Greatest Common Divisor of two numbers. Your program should take two input numbers from the user, and use a function named 'gcd' to find the GCD of those two numbers. Your program should then print out the GCD of the two numbers as the output.
Input Formate:
Integers
Output Formate:
Integer
Input:
0
0
Output:
0
Week 5 Programming Assignment 2
Last Day of Submission: 2-Mar-2022
Write a Python program that calculates the dot product of two lists containing the same number of elements.
Input Formate:
Lists
Output Formate:
Integer
Input
Output
Input
2 3 4
1 0 -1
Output
-2
Week 5 Programming Assignment 3
Last Day of Submission: 2-Mar-2022
Write a Python function that takes a string s as input and returns the length of the largest streak of 0s in the string.
Input Formate:
String
Output Formate:
length of longest streak ( Integer)
Input
Input
10001001
Output
3
3