Guest User

Untitled

a guest
Jul 21st, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.16 KB | None | 0 0
  1. def main():
  2. array=[1,2,3,5,6,7,8]
  3. length=8
  4. expected_sum=length*(length+1)/2
  5. print("The missing number is: "+str(int(expected_sum)-sum(array)))
  6.  
  7. main()
Add Comment
Please, Sign In to add comment