What is RECURSION?? #python #programming #coding

preview_player
Показать описание
This video explains what recursion is in Python.

Background Music:
Creative Commons Attribution-ShareAlike 3.0 Unported
Рекомендации по теме
Комментарии
Автор

one of the few examples of a video loop that makes sense

Musicalcode
Автор

“Recursion” is actually an acronym, and the “R” stands for “Recursion”.

jackdog
Автор

To fully understand recursion you need to fully understand recursion.

Linuxdirk
Автор

Reminded me of those nostalgic days of class 8.

tandradutta
Автор

factorial = lambda x: 1 if x<=1 else x*factorial(x-1)

dracokinerek
Автор

I used to keep getting the RecursionError, this made me realize recursion looks way simpler but iteration is just a way more efficient way of working

imdux
Автор

Ahhhh thank you bro this makes much more sense

jaromirgaines
Автор

cool trip to simplify the code you can do this :
return 1 if n=1 else n*factorial(n-1)

kirbykilledgod
Автор

I didn't have loop on my PC so when it cut off I was really confused.

xqt
Автор

Bro, I watched probably 10 videos about decision and after 1 short I understand it

ben
Автор

N even if we right n * (n-1) it workd the same way
But n * n- 1

GaiterBoy
Автор

Речь идёт о рекурсии. Когда функция вызывает сама себя много раз до тех пор пока х не станет равным 1

Samat
Автор

If n == 1: return 1
return n * factorial(n-1)

I just started python but I thought there's supposed to be an indentation for a if statement, I didn't know you can write it in the same line

Also, why did you return a value twice. I seriously am confused 😢

tvzone
Автор

I didn't know it was possible to make code on the same line after the ':'

samueljehanno
Автор

Why does every tutorial Vs Code theme look so good until i applied it in my VsCode!

ridwanulhoque
Автор

Recursion looks cool but Iteration more efficient

ian
Автор

Recursion loop, I see what you're doing

freddymintarja
Автор

Which vscode theme and font you are using

ronyjui
Автор

I dont get it. Imagine you have 4 as an input. that wil retunr= 4, 12, 24 and 1. But since the last stuff you return is 1, if you print it, wouldnt the answer be 1?

Svimbo_Life
Автор

Bro i like coding but I have no idea what he's talking about idk how ill ever learn

sephirlol
visit shbcf.ru