Code Genic is a blog which provides the codes for the daily life uses. All the codes are mostly for college related Projects or Lab work.
Sunday, March 3, 2019
Power of N (n^5) using user define function - Python3
def power(n): list1=[] result = n for i in range(5): list1.append(result) result *= n return list1 ip=int(input('Enter the value of n: ')) a=power(ip) print (a)
No comments:
Post a Comment