Tuesday, December 9, 2014

Python Class 104 - Kapil Sharma

Python CBT on YouTube:



Python Class 103 - Kapil Sharma

Function Creation:

>>> def functionName1():>>> print("Kapil")
>>>
>>> functionName1()
>>> Kapil

To create a python function 'def' word needs to be pre-fix in front of user function name end by"():"

OR

Users can also create functions like this way:

>>> def functionName2(Message):
>>> print(Message)
>>> functionName2("This is my message!")
>>> This is my message!

OR

>>> def functionName3(Message = "My Message."):
>>> print(Message)
>>> functionName3()
>>> My message.

OR

>>> def addVal1(Val1, Val2):
>>> print(Val1, "+" Val2, "=",(Va1 + Val2))
>>> addVal1(3,2) #User add the value 3,2
>>> 5  #Python IDE result is 5

OR

>>> def addVal2(Val1, Val2):
>>> return Val1 + Val2
>>> print("2 + 3 equals to 4 + 1 is ", (addVal2(2,3) == addVal2(4,1)))
>>> 2 + 3 equals to 4 + 1 is True #Python IDE result is 5 equal 5 True.


Monday, December 8, 2014

Python Class 102 - Kapil Sharma

Number Types In Python: 

Integers: They are whole/natural numbers with +/- number range.
                e.g: -3,-2,-1,0,1,2,3

Floating Values: Numbers with decimal values. 
                          e.g: 7.77

Complex Values: Real numbers + Imaginary numbers. 
                            e.g: 7 + 7XY 

Boolean Values: 0 OR 1 #True OR False

Note: To find type of any number: 

>>> myValue = 5 #User enter a variable value.
>>> type(myValue) #Than user search for variable type.
>>> #Python shows that user value is integer.






Operators In Python: 

Unary (+,-,~)
Arithmetic (+,-,*,/,%,//,**)
Relational (==,!=,>,<,>=,<=)
Logical (and, not, or)
Bitwise (&,|,^,~,<<,>>)
Assignment (=,+=,-=,*=,/=,%=,**=,//=)
Membership (In, not in)

Identity (Is, is not)

Python Class 101 - Kapil Sharma

Python Help Cmds: 

Start the python cmd window and type the following cmds for help information.

>>> help( )
>>> modules 
OR 
>>> types 
OR
>>> keywords
OR
>>> functions
OR
>>>help('FUNCTIONS')

Note: To exit help mode press "Ctrl + C".









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...