through TDD, you can grow your software design easily and constantly with building what you need to make your code pass. whenever you write a test, you can think of breaking the design into smaller pieces.
Arrange: is where you pay attention to the order of your data in the code.
Act: is where your code is executed correctly.
Assert: is where you compare to check your output with the expected one.
the cycle in TDD is made of three steps:
To summarize that up, TDD offers design software first which is great and also it offers more reliable code. More
a module is a file that contains statements and definitions of Python. whenever you are running in the module (source) there is a variable called name that will have a value called main. now if you decided to import this module to another file; the file name is the module name wth .py; and the module’s name is available as value to name global variable. That means using (if name == “main) will let you execute the file when you invoke the function directly. More
The process in which a function calls itself directly or indirectly you need to have a base case inside a condition that indicates the final execution of the code, and also the recursive part.1
The difference between direct and indirect recursion: when the function calls itself it it a direct function, and it is indirect when it calls another function.
The difference between tailed and non-tailed recursion: when the recursive call is the last thing executed it is a tailed function.
https://www.geeksforgeeks.org/recursion/ ↩