Python Forum
Beginner, my recursion returns None, and related problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Beginner, my recursion returns None, and related problem
#3
Thank you. I'll work on my terminology. Also, adding return arr at the end of those blocks made my junk work. Please tell me if I'm understanding this correctly: originally, if I put in a list of 2 or more numbers, the list got passed to 8 or 11 repeatedly until it was down to one member. At that point, 5 happens, and that returned the right number...but only to whatever loop recursive step summoned it, not back out to main(). With returns added, the number gets safely passed back up to where I can work with it again. Oof, head hurts.

Frankly, I'm still really hazy on recursion and what's talking to what. The materials thus far made sense as basically being step-a, step-b, do-step-c-until-d-happens sorts of processes. Ultimately, I know that beyond my confusion, this has to simply be more of that, but something about this isn't clicking for me. I'll keep at it, though. Thanks again!
Reply


Messages In This Thread
RE: Beginner, my recursion returns None, and related problem - by zpacemanzpiff - Jul-02-2020, 04:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Strange problem related to "python service" Pavel_47 1 1,417 Dec-07-2021, 12:52 PM
Last Post: Pavel_47
  I have an problem related to ujson in python dixitaditya248 2 2,692 Apr-12-2021, 08:11 AM
Last Post: bowlofred
  Although this is a talib related Q it's mostly related to python module installing.. Evalias123 4 5,731 Jan-10-2021, 11:39 PM
Last Post: Evalias123
  small beginner problem FelixReiter 2 1,879 Nov-17-2020, 03:26 PM
Last Post: FelixReiter
  Beginner having Syntax Error problem RyanHo 3 2,396 Sep-10-2020, 08:33 AM
Last Post: cnull
  R-PYTHON INTEGRATION RELATED PROBLEM arnab93 0 1,458 Jun-05-2020, 02:07 PM
Last Post: arnab93
  Beginner problem, replace function with for loop Motley_Cow 9 4,676 Sep-13-2019, 06:24 AM
Last Post: Motley_Cow
  recursion function (python beginner) everafter 3 2,909 Aug-19-2019, 07:24 AM
Last Post: buran
  Beginner problem in python script Cedmo 3 2,798 Jul-04-2019, 08:22 PM
Last Post: Cedmo
  Beginner Problem python 2.7 Jonathan_levy 2 2,701 Jul-04-2018, 08:46 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