Showing posts with label Windows. Show all posts
Showing posts with label Windows. Show all posts

Wednesday, August 19, 2020

Python Class 183 (Classification Metrics: Recall) - Kapil

I/P:
print("*** Classification Metrics: Recall ***")
print()
TPV = float(input("Please enter the True Postive value: "))
FNV = float(input("Please enter the False Negative value: "))
print()
RV1 = TPV+FNV
RV2 = TPV/RV1
print()
print("The Recall Value is %2f"%RV2)

#*(Bad) 0 </ Recall </ 1 (Good)


O/P

*** Classification Metrics: Recall *** Please enter the True Postive value: 2 Please enter the False Negative value: 8  

The Recall Value is 0.200000 



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


Wednesday, August 12, 2020

Python Class 181 (Gratuity Calculator Application) - Kapil

print ("*** Gratuity Calculator Application ***")
print()
LSD = float(input("Please enter your last drawn salary amomunt for your current company: "))
NYW = float(input("Please enter number of years working in current company: "))
print()
TGA = LSD * (15/26) * NYW
print("The total gratuity amount is: %.2f" %TGA)

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

Sunday, July 19, 2020

Python Class 176 (Odd/Even Numbers from a range) - Kapil

index1 = int(input("Please enter the starting range number: "))
index2 = int(input("Please enter the ending range number: "))

print("\n")

print("Prime number between {} and {} are:".format(index1, index2))

for num in range(index1,index2):
    if (num > 1):
        isDivisible = False
        for index in range(1, num):
            if (num % index == 0) or (num % 2 == 0):
                print("\n")
                print(num, "- is even number.")
                print("\n")
                isDivisible = True
                print(num,"The number is not prime.")
                break
        if not isDivisible:
            print("\n")
            print(num, "is a prime number.")
            print("\n")


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

Python Class 175 (Even Numbers) - Kapil

numbers = [1,2,3,4,5]
for num in numbers:
  if num % 2 == 0:
      print(num, "- is even number.")
      continue
  print(num, "- is odd number.")
else:
  print("\n")
  print("For loop exited.")
--------------------------------------

num = int(input("Please enter the number:"))
isDivisible = False
i = 2
while i < num:
    if num % i == 0:
        isDivisible = True
        print("{} is divisible by {}".format(num,i))
        break
    i +=1
if isDivisible:
    print("{} is NOT a prime number".format(num))
else:
   print("{} is a prime number".format(num))

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

Sunday, June 14, 2020

Python Class 155 (P/E, Price to Earnings Ratio) - Kapil Sharma

#Price-to-Earnings Ratio = Price per Share / Annual Earnings per Share
def PriceToEarningsRatio_function(n1,n2):
                           return(n1/n2)
SP1 = float(input("Please enter the share price value:"))
AE2 = float(input("Please enter the annual earnings value:"))
print("The Price to Earnings Ratio is:",PriceToEarningsRatio_function(SP1, AE2), "%")

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

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

Friday, June 5, 2020

Python Class 143 (Marginal Tax Rate ) - Kapil Sharma


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

TP1 = float(input("Please enter total Tax Payable value:"))
TI2 = float(input("Please enter total Taxable Income value:"))

#Marginal Tax Rate Formula = Tax Payable / Taxable Income

print ("The Marginal Tax Rate Formula is:",(MarginalTaxRate_function(TP1, TI2)))




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

https://github.com/bornfreesoul/PythonLessons

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

Thursday, June 4, 2020

Python Class 141 (Tax Rate) - Kapil Sharma

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

TE1 = float(input("Please enter total Tax Expenses value:"))
IT2 = float(input("Please enter total Taxable Income value:"))

#Effective Tax Rate for Individual = Total Tax Expenses / Taxable Income

print ("The Effective Tax Rate for Individual is:",(TaxRate_function(TE1, IT2)))




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

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

Thursday, May 28, 2020

Python Class 135 (Absolute returns) - Kapil Sharma

#Absolute returns of a Mutual Fund:-

AV1 = float(input("Please enter the appreciated value:"))
PV2 = float(input("Please enter the purchased value:"))

ARV = ((AV1 - PV2)*100/PV2)

print ("The absolute return value is (ARV):",ARV,"%")


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

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")


Thursday, May 21, 2020

Python Class 128 - Kapil Sharma

#Squire Function Example: -


def create_squires(n1,n2):
return (n1**n2)

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


print(create_squires(uv1, uv2))


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

https://github.com/bornfreesoul/PythonLessons

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

Sunday, May 17, 2020

Python Class 122 - Kapil Sharma



from pip._vendor.distlib.compat import raw_input

print("\n")
print("*** Welcome to Bank Financial Software Solutions *** ")
print(" \t ** This is a addition calculator ** ")
print("\n")

Uvalue1 = float(raw_input("Please enter the first rupee value, user wants to add: \n"))
Uvalue2 = float(raw_input("Please enter the second rupee value, user wants to add: \n"))
Result = (Uvalue1 + Uvalue2)
print("\n")

print("The two amount addition sum is:", Result, "Rupees", "\n")

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

from pip._vendor.distlib.compat import raw_input

print("\n")
print("*** Welcome to the Store Inventory Management Software Solutions *** ")
print(" \t ** This is a Store Inventory Management Program ** ")
print("\n")

Inventory1 = ["Rice", "Maze", "Oil", "Toothpaste", "Beans", "Cloth", "Pepper"]
print("Here are present items list information:", Inventory1)

CheckInv1 = input('Is this item present in the inventory: \n')

if CheckInv1 in Inventory1:
print("This item is present in the inventory list.")
else:
print("User entered item is not present in the list.")

Thanks to user: https://stackoverflow.com/users/2897372/

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

https://github.com/bornfreesoul/PythonLessons

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

Saturday, May 9, 2020

Python Class 114 - Kapil Sharma

#elif statement example:

from pip._vendor.distlib.compat import raw_input

myInfo = float(raw_input("Please enter the price: "))

if myInfo >= 1000:
    print("Good Price")
elif myInfo <= 1000:
    print("Low Price")
else:

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