Python Forum
Need Help: Sort of Binary numbers based on 1's present
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need Help: Sort of Binary numbers based on 1's present
#1
Question:
1. Find the Binary numbers from the given list of Numbers .
2. sort on ascending order based on the no of 1's present
3. if no of 1's are same , then give preference to its decimal nos.
4. After sorting, convert to Decimal numbers and Display the output .
Reply


Messages In This Thread
Need Help: Sort of Binary numbers based on 1's present - by abinashj - Jul-25-2017, 11:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Check if a value is present in each group Menthix 8 2,750 May-16-2022, 12:25 PM
Last Post: Menthix
Photo a.sort() == b.sort() all the time 3lnyn0 1 1,328 Apr-19-2022, 06:50 PM
Last Post: Gribouillis
  Anaconda pip install mpyc Error pip-script.py is not present Anldra12 2 7,865 Dec-13-2021, 06:59 PM
Last Post: Anldra12
  How to sort rows based on specific order Mekala 3 2,240 Jul-31-2020, 01:01 AM
Last Post: bowlofred
  No Scripts File present after python installation ag2207 5 4,928 Jul-30-2020, 11:11 AM
Last Post: buran
  How to make this function general to create binary numbers? (many nested for loops) dospina 4 4,448 Jun-24-2020, 04:05 AM
Last Post: deanhystad
  Python function executes twice when region loop is present bluethundr 2 2,642 Jan-07-2020, 03:01 PM
Last Post: bluethundr
  "usr" directory not present and needed for cmd commands? ajetrumpet 2 2,173 Dec-19-2019, 05:59 PM
Last Post: ajetrumpet
  hex file to binary or pcap to binary baran01 1 5,707 Dec-11-2019, 10:19 PM
Last Post: Larz60+
  Deleting files not present in CSV spw2515 1 1,932 Sep-04-2019, 06:06 PM
Last Post: ichabod801

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020