Answers for "FIND MISSING NUMBER IN AN ARRAY IN PYTHON"

0

FIND MISSING NUMBER IN AN ARRAY IN PYTHON

def get_missing_summatin(a):
  n = a[-1]
  total = n*(n+1)//2
  summation = 0
  summation = sum(a)
  result = total-summation
  print(result)

a = [1,2,3,5,6,7]
get_missing_summatin(a)
Posted by: Guest on May-26-2021

Code answers related to "FIND MISSING NUMBER IN AN ARRAY IN PYTHON"

Python Answers by Framework

Browse Popular Code Answers by Language