- 2

Given a list of n-1 numbers ranging from 1 to n, your task is to find the missing number. There are no duplicates.  Input Forma

9th Apr 2020, 6:04 AM
Pallab Das
7 Respuestas
+ 6
Pallab Das run it in sololearn code playground
9th Apr 2020, 6:21 AM
R🍁🇮🇳
R🍁🇮🇳 - avatar
+ 5
Pallab Das Show your attempt share your code so that it will be helpful to know your problem
9th Apr 2020, 6:11 AM
R🍁🇮🇳
R🍁🇮🇳 - avatar
+ 2
Do self.
9th Apr 2020, 6:05 AM
A͢J
A͢J - avatar
0
Which i do in this it's not run
9th Apr 2020, 6:10 AM
Pallab Das
0
def missing_number(num_list): return sum(range(num_list[0],num_list[-1]+1)) - sum(num_list) print(missing_number([1,2,3,4,6,7,8])) print(missing_number([10,11,12,14,15,16,17]))
9th Apr 2020, 6:13 AM
Pallab Das
0
It's not compile
9th Apr 2020, 6:14 AM
Pallab Das
0
Fail when i run in sololearn code...plz solve this
9th Apr 2020, 7:41 AM
Pallab Das