I can't read your link...
codes are :
codes are :
#Binary conversion cnt_num = int(input("Enter total no of number : ")) num = [] for i in range(cnt_num): print("Enter numbers:[",i,"]: ",end = '') num1 = int(input()) num.append(num1) print("Numbers in list are : ",num) for j in range(len(num)): bin_num.append(bin(num[j])[2:]) bits = bin_num[j].count('1') print(num[j],bin_num[j],' count ones are : ',bits)#Need to write logic to sort the binary numbers based on counting no of 1's