Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
team pair issue
#20
(Feb-29-2020, 03:07 PM)jefsummers Wrote: Think about it. You are using a 1D array (list) to store your numbers and define your pairs as x[n] and x[n+1]. Is this the best way, or should you use actual pairs?

What are you doing to prevent accidentally stranding numbers making the task impossible? For example, if your list has the numbers 0,1,2,3,4,5 and you have one of your pairs as 1,2, that is a "good looking pair" but 0 can never be paired to be good looking (hint - all pairs must have the even number as the lower number and the odd as lower+1).

That should get you going. Show your work along with intermediate results.

I am not sure which way is best here only thing i am concerned to solve it as soon as possible,as i have been struggling with this complex problem for a long time now.if any one could please tell me exactly what corrections i should make in my existing code to get desired input/output then it would be much aprrecited.

Thanks
Reply


Messages In This Thread
team pair issue - by jk91 - Feb-28-2020, 07:03 AM
RE: team pair issue - by ndc85430 - Feb-28-2020, 08:19 AM
RE: team pair issue - by jk91 - Feb-28-2020, 10:24 AM
RE: team pair issue - by jefsummers - Feb-28-2020, 11:40 AM
RE: team pair issue - by jk91 - Feb-28-2020, 01:37 PM
RE: team pair issue - by jefsummers - Feb-28-2020, 03:01 PM
RE: team pair issue - by jk91 - Feb-28-2020, 03:56 PM
RE: team pair issue - by ndc85430 - Feb-28-2020, 04:21 PM
RE: team pair issue - by jk91 - Feb-28-2020, 04:59 PM
RE: team pair issue - by ndc85430 - Feb-28-2020, 05:16 PM
RE: team pair issue - by jk91 - Mar-02-2020, 02:05 PM
RE: team pair issue - by jk91 - Feb-29-2020, 05:51 AM
RE: team pair issue - by ndc85430 - Feb-29-2020, 06:00 AM
RE: team pair issue - by jk91 - Feb-29-2020, 07:38 AM
RE: team pair issue - by ndc85430 - Feb-29-2020, 07:42 AM
RE: team pair issue - by jk91 - Feb-29-2020, 10:05 AM
RE: team pair issue - by ndc85430 - Feb-29-2020, 11:02 AM
RE: team pair issue - by jk91 - Feb-29-2020, 12:22 PM
RE: team pair issue - by ndc85430 - Feb-29-2020, 12:36 PM
RE: team pair issue - by jefsummers - Feb-29-2020, 03:07 PM
RE: team pair issue - by jk91 - Mar-02-2020, 06:50 AM
RE: team pair issue - by buran - Mar-02-2020, 06:54 AM
RE: team pair issue - by jk91 - Mar-02-2020, 09:52 AM
RE: team pair issue - by jk91 - Mar-02-2020, 11:01 AM
RE: team pair issue - by jk91 - Mar-02-2020, 01:48 PM
RE: team pair issue - by DeaD_EyE - Mar-02-2020, 01:56 PM
RE: team pair issue - by ndc85430 - Mar-02-2020, 04:47 PM
RE: team pair issue - by jefsummers - Mar-02-2020, 04:48 PM
RE: team pair issue - by jk91 - Mar-03-2020, 04:10 PM
RE: team pair issue - by jefsummers - Mar-03-2020, 06:15 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting the maximum value:key pair from a dictionary sean1 2 1,481 Jan-17-2022, 01:04 PM
Last Post: DeaD_EyE
  How to extract specific key value pair from string? aditi06 0 2,582 Apr-15-2021, 06:26 PM
Last Post: aditi06
  Auto re-pair / re-sync Controller via Script? User3000 2 2,387 Nov-30-2020, 11:42 AM
Last Post: User3000
  Search a List of Dictionaries by Key-Value Pair; Return Dictionary/ies Containing KV dn237 19 6,917 May-29-2019, 02:27 AM
Last Post: heiner55
  Key Value Pair output UtiliseIT 9 4,806 May-03-2019, 07:30 AM
Last Post: buran
  Parsing Text file having repeated value key pair using python manussnair 3 3,347 Aug-04-2018, 11:48 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

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