Python Forum
XOR solution explanation needed.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XOR solution explanation needed.
#2
Couple of observations:
1. Your assignment states that in the sequence only one number is odd. In the code you pass sequence with multiple odd numbers.
2. If you pass different sequence, result is not as expected.
e.g.
print(find_it([2,3,1,2,3,1]))
Output:
0
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


Messages In This Thread
XOR solution explanation needed. - by omm - Oct-25-2020, 06:30 AM
RE: XOR solution explanation needed. - by buran - Oct-25-2020, 07:13 AM
RE: XOR solution explanation needed. - by omm - Oct-25-2020, 08:45 AM
RE: XOR solution explanation needed. - by buran - Oct-25-2020, 09:21 AM
RE: XOR solution explanation needed. - by omm - Oct-25-2020, 01:03 PM
RE: XOR solution explanation needed. - by omm - Oct-26-2020, 06:30 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  New learner in Python, and need help on the term explanation BaicaiPy 3 1,359 Oct-15-2022, 03:31 PM
Last Post: Yoriz
  Some line code explanation Chrilo06 3 2,202 Feb-24-2022, 06:24 PM
Last Post: deanhystad
  While statement explanation alkhufu2 3 2,454 Sep-02-2020, 05:46 PM
Last Post: alkhufu2
  Output explanation AmanTripathi 2 2,896 Feb-14-2018, 03:03 PM
Last Post: AmanTripathi
  need help with some explanation vincelim99 2 3,688 Mar-24-2017, 04:12 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

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