Thursday, May 14, 2015

Python Class 109 - Kapil Sharma

1. while loop: Works till the time condition meet.

2. for loop: works for number of iterations.

3. function: Pre-fabricated code. 
    "def xyz(x): "

4. Class: It's a template of one or multi-functions features and variables.
    Classes can be inherit from super-class to child-class.
    First make class than make its objects to use it's resources.

5. Constructor: Special method in a class. As soon user create object.
    It executed it self, no need to call it.

6. Import: User can import python modules, by using import cmd.
    import xyz > xyz.abc()
    Also, any edit in the import module source file, user needs to,
    reload(xyz) cmd to update the import module in the source code.

7. dir(math) > help(math): This is the way to show help in details.

Monday, May 11, 2015

Python Class 108 - Kapil Sharma

Cheet Sheet: 

1. List = Arrays.

   List = ["One","Two","Three"];
   print List[2];

2. Tuple() = List, but its cannot be changed. (Unmutable)/xyz[2]


3. Sets = Are similar to list, un-ordered collection of unqiue elements.

   No, duplicates.

4. Dictionaries{} = Arrays. Un-order collections of key value pairs.

   dict = {"Key":"Value"}

5. __XYZ = Is declaring local variable by adding "__"


6. pop / remove: Both do the same thing.

   But implementation is different. In "pop" user needs
   to give index id: xyz.pop(1) / xyz.remove("abc")

7. xyz.find("abc"): Give the location index id of the text. 


8. "is": For same value, like one = two = [1,2,3] its true.


9. "in": For checking true values, "s" in "Kiwi" its false.


Python GitHub Repo: https://github.com/bornfreesoul/Python

Blockchain: 101 (By - Kapil Sharma)

 https://testing-mines.blogspot.com/2021/10/blockchain-101-by-kapil-sharma.html Blockchain through the following attributes: Distributed:  T...