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


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

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

Saturday, August 8, 2020

Python Class 180 (Profit calculation on basis of stock dividend ) - Kapil

print ("** Stock dividend - calculator application **")

print()

TNST = float(input("Please enter the count of total number of stocks: "))
ADPO = float(input("Please enter annual dividend payout per annum: "))
CSPP = float(input("Please enter the current stock price: "))

DPAY = (ADPO/CSPP) * 100

print()

print("The annual dividend yield value is: %.2f " %DPAY)

print()

TPSV = ADPO * TNST

print("Total profit due to dividend is: %.2f" %TPSV)

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

Friday, August 7, 2020

Python Class 179 (Histogram plotting) - Kapil

 import pandas as pd

import seaborn as sns
import numpy as np
import matplotlib.pyplot as plt

iris = pd.read_csv("iris.csv")

sns.FacetGrid(iris, hue="variety", height=5).map(sns.distplot,"petal.length")
.add_legend()
plt.show()

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

Thursday, August 6, 2020

Python Class 178 (Dataset plotting) - Kapil

import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np

iris = pd.read_csv("iris.csv")
print(iris.shape)
print(iris.columns)
print(iris.rank)


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

Wednesday, August 5, 2020

Python Class 177 (Compare two lists) - Kapil

import random

I/P:
l1 = list(range(5))
random.shuffle(l1)


l2 = list(range(10))
random.shuffle(l2)

count = 0
for i in l1:
    for j in l2:
        if i == j:
           print(i)
           count +=1
print("Common numbers are as following: ", count)

-------------------------------------------------

O/P:
0 4 3 1 2 Common numbers are as following: 5

-------------------------------------------------


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

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