Showing posts with label Commands. Show all posts
Showing posts with label Commands. Show all posts

Saturday, August 15, 2020

Python Class 182 (Money Exchange Rate ) - Kapil

 print("*** Money Exchange Rate Application ***")

# c = a * b
# MER = Money After Exchange / Money Before Exchange
print()
AFE = float(input("Please enter the money amount after exchange: "))

MBE = float(input("Please enter the money amount before exchange: "))

MER = AFE / MBE
print()
print("The money exchange forumla ratio one is: %2f" %MER)
print()

print("Money exchange rate formula two: ")

c = MBE * MER

print("Money exchange amount for received for currency conversion is: %2f" %c)


===============================================================
https://github.com/bornfreesoul/PythonLessons
https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg

Saturday, June 13, 2020

Python Class 154 (Mean Value) - Kapil Sharma

print (" *** Application for calculation Mean value *** ")
print("\n")
FV = float(input("Please enter the first value:"))
SV = float(input("Please enter the second value:"))
TV = float(input("Please enter the third value:"))
TTV = float(input("Please enter the number of terms count:"))
print("\n")
M1 = FV + SV + TV 
M2 = M1/TTV 
print("The mean value is:",M2)


===============================================================

https://github.com/bornfreesoul/PythonLessons
 
https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg 




Sunday, June 7, 2020

Python Class 145 (Relative Frequency) - Kapil Sharma

#Relative Frequency  = Successful trials / Total number of trials 

def RelativeFrequency_function(n1,n2):
                         return(n1/n2)

ST1 = float(input("Please enter the successful trials count:"))
TT2 = float(input("Please enter the number of trials count:"))

RF = RelativeFrequency_function(ST1, TT2) * 100

print("The Relative frequency percentage is:",RF, "%")


===============================================================

https://github.com/bornfreesoul/PythonLessons

https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg

Wednesday, June 3, 2020

Python Class 140 (Total Sale) - Kapil Sharma

print ("*** Application for Total Sale Amount Formula ***")

print ("\n")

SP = float(input("Please enter the Selling Price value:"))
ST = float(input("Please enter the Sale Tax value:"))

#Total sale amount = selling price + sales tax.

TSA = SP + ST 

print ("The total sale amount value is:" , (TSA))


===============================================================


https://github.com/bornfreesoul/PythonLessons


https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg


Monday, June 1, 2020

Python Class 138 (Expense Ratio) - Kapil Sharma

def ExpenseRatio_function(n1,n2):

                  return (n1/n2)


# Expense Ratio = Total Operating Expenses / Average Net Asset Value


OE1 = float(input("Please enter the total Operating expenses value:"))

NA2 = float(input("Please enter the Average net asset value:"))


print ("The total expense ratio is (PE):",(ExpenseRatio_function(OE1, NA2)))





===============================================================


https://github.com/bornfreesoul/PythonLessons


https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg

Sunday, May 31, 2020

Python Class 137 (Simple Interest) - Kapil Sharma


print(" *** Simple Interest Application Calculator *** ")

print ("\n")

#SI = = P(1 + rt)

#SI - Simple Interest, P  - Principal, R  - Rate, T  - Term

P = float(input("Please enter the Principal amount value: "))
R = float(input("Please enter the Rate of interest value: "))
T = float(input("Please enter the Terms in years count: "))

RV = R/100

SI1 = 1+RV*T

SI2 = P * SI1

print(SI2)




===============================================================

https://github.com/bornfreesoul/PythonLessons

https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg

Saturday, May 30, 2020

Python Class 136 (Net Asset Value) - Kapil Sharma

print(" *** Net Asset Value Application *** ")

print("\n")

#The net value of an asset = (Total asset – total liabilities)/ total outstanding shares

TAV = float(input("Please enter the Total Asset Value: "))
EL = float(input("Please enter the Existing liabilities: "))
OU = float(input("Please enter the Outstanding units: "))

NAV1 = TAV-EL

NAV2 = NAV1/OU

print("The Net Asset Value is:", NAV2)





===============================================================

https://github.com/bornfreesoul/PythonLessons

https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg

Monday, May 25, 2020

Python Class 133 (Mean) - Kapil Sharma

#Mean Function Example: 

def Mean_function(n1,n2): return (n1/n2) MV1 = float(input("Please enter sum of terms value:"))
TV2 = float(input("Please enter number of terms value:")) print ("The mean value is (m):" , (Mean_function(MV1, TV2)))


===============================================================

https://github.com/bornfreesoul/PythonLessons

https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg



Saturday, May 23, 2020

Python Class 132 (Density) - Kapil Sharma


#Example of Density per cm*3 function:- 

def Density_function(n1,n2):
              return (n1/n2)

MV1 = float(input("Please enter total mass value:"))
VV2 = float(input("Please enter total volume value:"))

print ("The density is (p):" , (Density_function(MV1, VV2)), "g/cm3")


Friday, May 22, 2020

Python Class 129 - Kapil Sharma

#Example of percentage function:- 

def percentage_function(n1,n2):
    return (n1/100*n2)

uv1 = float(input("Please enter the first value:"))
uv2 = float(input("Please enter the second value:"))

print(percentage_function(uv1, uv2))



===============================================================

https://github.com/bornfreesoul/PythonLessons

https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg

Friday, May 15, 2020

Python Class 120 - Kapil Sharma


def square(num):
    return num**2my_nums = [1,2,3,4,5]
for item in map(square,my_nums):
    print(item)

==================================

https://github.com/bornfreesoul/PythonLessons

https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg

Wednesday, May 13, 2020

Python Class 118 - Kapil Sharma

index_count = 0
mCar1 = ["BMW", "Tesla", "Ford"]
for mycar in mCar1:
    print([index_count],"-","Car Maker Name:", mycar)
    index_count +=1

==========================================


https://github.com/bornfreesoul/PythonLessons

https://www.youtube.com/channel/UCe0rLJmSQXNoK2Mo2eMVuvg

Sunday, May 10, 2020

Python Class 115 - Kapil Sharma

#For Loop Example - 1:
my_Money5 = ["Dollar","Rupee","Ruble"]

for Money in my_Money5:
      print (Money, "Currency")
      
#For Loop Example - 2:
for i in range(1000):
    print ("i= ", i)
    if (i == 999):
        break

#While Loop:
count = 0
while count < 10:
    print("Count is less than ten.", count)
    count+=1

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

Monday, December 8, 2014

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