Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
num+1
#9
Yoriz thank you very much for the code visualizer, it helps allot !

ndc, what i don't understand is the "game" of numbers that runs in the loop,
i don't totally understand the concept of recursion and so it is another subject that i'm having difficulty with...

i don't understand why the output is what it is...

what mostly i'm stuck with is the line:

result = k + tri_recursion(k - 1)


if k runs 6 times, beginning with 6 - and so it is: 6 + (6-1) (should equal 11...but no 11 in output)

i'm surely missing something here, but i don't know what it is..
Reply


Messages In This Thread
num+1 - by astral_travel - Oct-16-2022, 02:15 PM
RE: num+1 - by ndc85430 - Oct-16-2022, 02:36 PM
RE: num+1 - by astral_travel - Oct-16-2022, 02:36 PM
RE: num+1 - by snippsat - Oct-16-2022, 02:51 PM
RE: num+1 - by astral_travel - Oct-16-2022, 02:57 PM
RE: num+1 - by astral_travel - Oct-16-2022, 03:18 PM
RE: num+1 - by ndc85430 - Oct-16-2022, 03:27 PM
RE: num+1 - by Yoriz - Oct-16-2022, 03:32 PM
RE: num+1 - by astral_travel - Oct-16-2022, 06:35 PM
RE: num+1 - by Larz60+ - Oct-17-2022, 01:57 AM
RE: num+1 - by astral_travel - Oct-17-2022, 09:49 AM
RE: num+1 - by ndc85430 - Oct-18-2022, 05:53 AM
RE: num+1 - by astral_travel - Oct-20-2022, 05:23 PM

Forum Jump:

User Panel Messages

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