Week 4 Programming Assignment 1 Get link Facebook X Pinterest Email Other Apps - February 15, 2021 def arrange_number(a, b): if a>b: s=b else: s=a for i in range(1, s+1): if a%i==0 and b%i==0: result=i return result m=int(input())n=int(input())print(arrange_number(m,n,)) Get link Facebook X Pinterest Email Other Apps Comments
Week 3 Programming Assignment 3 - February 08, 2021 a=[int(i) for i in input().split()] final = [] for i in a: if i not in final: final.append(i) print(*final, sep=" ",end=" ") Special thanks to-Ayush Paul(ECE,1st yr) Read more
Week 4 Programming Assignment 2 - February 15, 2021 def fact(num): product=1 while(num>1): product*=num num-=1 return product m=int(input()) #m=men n=int(input()) #n=women if m+n>20 or m<=n: print('invalid',end="") else: print(fact(m)*fact(n)*fact(m+1)//(fact(n)*fact(m+1-n)),end="") Read more
Comments
Post a Comment