Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
team pair issue
#21
All of us - you and all good people here on the forum, will have hard time if you continue like this. As ndc85430 already explained you need to put some effort in solving the problem, try what is suggested, etc. Just keeping posting like this won't help.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#22
actually i am not sure in which branch of my code i should make changes and what changes should i make here to get desired input/output?

Thanks
Reply
#23
(Mar-02-2020, 09:52 AM)jk91 Wrote: actually i am not sure in which branch of my code i should make changes and what changes should i make here to get desired input/output?

Thanks
any updates plese?

(Mar-02-2020, 11:01 AM)jk91 Wrote:
(Mar-02-2020, 09:52 AM)jk91 Wrote: actually i am not sure in which branch of my code i should make changes and what changes should i make here to get desired input/output?

Thanks
any updates plese?
Actually i am not sure where to correct my code so need some help regarding same.

(Mar-02-2020, 11:01 AM)jk91 Wrote:
(Mar-02-2020, 09:52 AM)jk91 Wrote: actually i am not sure in which branch of my code i should make changes and what changes should i make here to get desired input/output?

Thanks
any updates plese?

(Mar-02-2020, 11:01 AM)jk91 Wrote: any updates plese?
Actually i am not sure where to correct my code so need some help regarding same.
however someone has just given some hints but that is not sufficient for me to understand where to correct and how to correct and what to correct to get desired input/output.

Thanks

(Mar-02-2020, 06:54 AM)buran Wrote: All of us - you and all good people here on the forum, will have hard time if you continue like this. As ndc85430 already explained you need to put some effort in solving the problem, try what is suggested, etc. Just keeping posting like this won't help.

I know you all you are experts but not everyone is expert here that is why they are seeking experts help here right?
so it is not that i am not making any effort but the thing is what effort should i make to get desired input/output.

(Mar-02-2020, 06:54 AM)buran Wrote: All of us - you and all good people here on the forum, will have hard time if you continue like this. As ndc85430 already explained you need to put some effort in solving the problem, try what is suggested, etc. Just keeping posting like this won't help.

I know you all you are experts but not everyone is expert here that is why they are seeking experts help here right?
so it is not that i am not making any effort but the thing is what effort should i make to get desired input/output.

User has been warned for this post. Reason: Excessive thread bumping
Reply
#24
(Mar-02-2020, 11:01 AM)jk91 Wrote:
(Mar-02-2020, 09:52 AM)jk91 Wrote: actually i am not sure in which branch of my code i should make changes and what changes should i make here to get desired input/output?

Thanks
any updates plese?

(Mar-02-2020, 11:01 AM)jk91 Wrote: any updates plese?
Actually i am not sure where to correct my code so need some help regarding same.

(Mar-02-2020, 11:01 AM)jk91 Wrote: any updates plese?

User has been warned for this post. Reason: Excessive thread bumping:- who put this remarks against my posts?
Actually i am not sure where to correct my code so need some help regarding same.
however someone has just given some hints but that is not sufficient for me to understand where to correct and how to correct and what to correct to get desired input/output.

Thanks

(Mar-02-2020, 06:54 AM)buran Wrote: All of us - you and all good people here on the forum, will have hard time if you continue like this. As ndc85430 already explained you need to put some effort in solving the problem, try what is suggested, etc. Just keeping posting like this won't help.

I know you all you are experts but not everyone is expert here that is why they are seeking experts help here right?
so it is not that i am not making any effort but the thing is what effort should i make to get desired input/output.

(Mar-02-2020, 06:54 AM)buran Wrote: All of us - you and all good people here on the forum, will have hard time if you continue like this. As ndc85430 already explained you need to put some effort in solving the problem, try what is suggested, etc. Just keeping posting like this won't help.

I know you all you are experts but not everyone is expert here that is why they are seeking experts help here right?
so it is not that i am not making any effort but the thing is what effort should i make to get desired input/output.


User has been warned for this post. Reason: Excessive thread bumping
Reply
#25
What is the definition of "good looking List"?
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#26
(Feb-28-2020, 05:16 PM)ndc85430 Wrote: You need to spend some time trying to work out why the program isn't working as you want - we aren't here to do the work for you. Start by adding some extra print statements, to check that your variables have the values you expect and that the right branches are being entered. That will help narrow down where the problem is.
in which branch i need to put wht desired code?
Reply
#27
You seem to be missing the point. You need to try things out for yourself, rather than expecting us to do the work for you. That's pretty much the definition of a help vampire. I think I'll bail out now, rather than continue to go in circles with you.
Reply
#28
Your sample data has 7 elements. Therefore it cannot all be paired. Start there.
SHOW YOUR WORK.
Reply
#29
ok,let's talk about case by case let's first focus on first case here:-


Sample Input 1:

3
1 3
0 2
4 5


Sample Output 1:

1

Explanation:

If we swap 0 and 3 list becomes (1,0),(3,2) and (4,5),which is a good looking list.

So any idea atleast how can we progress towards step by step achieving this goal?

Thanks
Reply
#30
In your code, line 101, pairs has 7 elements. You divide the count of elements by 2 to get the number of pairs (dropping remainder). You cannot pair everything up using that.

I get that a good looking list has pairs such that each element in the pair is one from the other, can be either order.
A for loop that has a step of 2 will let you assess pairs. A good looking pair will have an even number n and odd number n+1. If the pair is ugly then make a swap.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Getting the maximum value:key pair from a dictionary sean1 2 1,430 Jan-17-2022, 01:04 PM
Last Post: DeaD_EyE
  How to extract specific key value pair from string? aditi06 0 2,521 Apr-15-2021, 06:26 PM
Last Post: aditi06
  Auto re-pair / re-sync Controller via Script? User3000 2 2,317 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,696 May-29-2019, 02:27 AM
Last Post: heiner55
  Key Value Pair output UtiliseIT 9 4,693 May-03-2019, 07:30 AM
Last Post: buran
  Parsing Text file having repeated value key pair using python manussnair 3 3,271 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