Akhil-Data-Structures

Github Pages - Data Structures 1


Project maintained by AkhilNandhakumar Hosted on GitHub Pages — Theme by mattgraham

Navbar

Home/Current Proj. TPT Notes Data Struc. Work Create Task AP Prep and Plan Past Projects

Tech Talk Work + Data Structures Projects


Table of Contents:


Runtime:


TT0 Details


TT1 Details

Python For Loops
A for loop is used for iterating over a sequence (that is either a list, a tuple, a dictionary, a set, or a string).
This is less like the for keyword in other programming languages, and works more like an iterator method as found in other object-orientated programming languages. With the for loop we can execute a set of statements, once for each item in a list, tuple, set etc.
The range() Function:
To loop through a set of code a specified number of times, we can use the range() function,
The range() function returns a sequence of numbers, starting from 0 by default, and increments by 1 (by default), and ends at a specified number.

Recursion means a defined function can call itself.
The developer should be very careful with recursion as it can be quite easy to slip into writing a function which never terminates, or one that uses excess amounts of memory or processor power. There must be a termination/exit condition that allows the function to exit without calling itself. This condition allows the recursion to stop - that is, without it the function would call itself over and over again, resulting in an error. However, when written correctly recursion can be a very efficient and mathematically-elegant approach to programming. ***

TT2 Details