Python program to find area of circle
As we know how find the circle area mathmatically because in this programing tutorial we are going to use simple maths formula of circle area. Area = 3.14*Radius*Radius It means …
As we know how find the circle area mathmatically because in this programing tutorial we are going to use simple maths formula of circle area. Area = 3.14*Radius*Radius It means …
A fundamental task in programming is swapping the values of two variables. In Python, this can be easily accomplished through a simple and concise program. The act of swapping allows …
Method-01 In this method we just use simple mathemtics formulas and operations. As you can see we are finding quotient and remainder of given number. def reverseNumber(N): sum=0 while (N>0): …
Method-01 def sumOfDigits(N): sum=0 while(N>0): D=int(N%10) sum=sum+D N=int(N/10) return sum n =int(input("Enter the number: ")) print("Sum Of Digits: ",sumOfDigits(n)) Output: Enter the number: 89 Sum Of Digits: 17
Python Program To Search An Element In A List Example def searchData(dataArray,N): flag = 1 for i in range(0,len(dataArray)): if(dataArray[i] == N): print("Yes, {} is exits in data.".format(N)) flag = …
Write a python program to iterate over a 2D list in different ways. Method-01 In this method we are using the length of list to iterate 2D list. list2d = …
Write a python program to append entire list to another list. There are sevral methods to append entire list to another list. Python have some function and operator to do …
Write a python program to calculate Mode using List. def findMode(mList): counter = 0 dict1 = {} mode = {} if len(mList) == len(set(mList)): print("No Mode.") else: set1 = set(mList) …
Write a python program to calculate Median using List. 01. Method def findMedian(mList): mList.sort() print (‘Sorted List: ‘, mList) if len(mList) % 2 == 0: n = mList[len(mList) // 2] …
There are various methods to solve a problem in programming because everyone uses their own method to solve a programming problem. In this article we will discuss 3-4 methods of …