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 | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
- 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 Respostas
+ 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