Daily Tips: Data Science | SoloLearn: Learn to code for FREE!

+51

Daily Tips: Data Science

Are there fellow students who have studied the Daily Tips: Data Science. The code coach challenge. For example: Missing Numbers. Coach / 105.

5/19/2020 4:16:49 PM

Aad Hoogenboom

8 Answers

New Answer

+40

It is quite complex.

+31

Thank you for your information. Good luck with the study.

+5

first take the input from the user(in the form of a list) then sort it using the 'sort()' syntax then you can use the for loop and print all the values of i which are not in the list "According to me this is the simplest method". NO NEED OF DOING THINGS COMPLEX.

+2

+2

It took me 14 lines so probably didn't break any records but it was fun :-) N_input = int(input()) element_list = [] for n_in in range(N_input): element_list.append(int(input())) full_string = [] ind = min(element_list) while ind < max(element_list) + 1: full_string.append(ind) ind += 1 out_string = '' for element in full_string: if element not in element_list: out_string += str(element) + ' ' print(out_string[:-1])

+1

+1

+1

Haven't done it yet, I'll give it a try