Showing posts with label CBT. Show all posts
Showing posts with label CBT. Show all posts

Monday, October 12, 2020

Python Class 186 (Missile Speed Calculator) - Kapil

I/P:

print ("** Missile speed calculator **")

print()
MSV = float(input("Please enter the missile speed in Mach: "))

KMV = 1234*MSV

PSV = KMV/60/60
print()
print("The missile travel: %.2f" %PSV,"KM per second speed")
print()
MRV1 = float(input("Please enter the missile range in KM: "))

MRV2 = MRV1/PSV
print()
print("Missile travel",MRV1,"KMs in %.2f" %MRV2, "seconds.")

O/P:
** Missile speed calculator ** Please enter the missile speed in Mach: 8 The missile travel: 2.74 KM per second speed Please enter the missile range in KM: 450 Missile travel 450.0 KMs in 164.10 seconds.


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


Tuesday, September 15, 2020

Python Class 185 (Price-to-Earnings Ratio) - Kapil

 print ("** Price-to-Earnings Ratio **")


#Price per share / Earnings per share = P/E Ratio

PPS = float(input("Please enter price per share: "))
EPS = float(input("Please enter earnings per share: "))

PER = PPS / EPS

print("Price-to-Earnings Ratio is: %.2f" %PER)


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

Saturday, July 18, 2020

Python Class 174 (Prime Numbers in 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))

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



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

Saturday, July 11, 2020

Python Class 172 (Money Double Calculator, Part-III) - Kapil

print("*** Money Rule of 72 ***")
def SeventyTwo_function(n1,n2):
          return(n1/n2)
print("\n")
UV = float(input("Please enter the value of rate of interest:"))
print("\n")
print("Time to double the investment in years is:",SeventyTwo_function(72,UV))
print("\n")
AI = float(input("Please enter the amount value invested:"))
print("\n")
FF = AI * 2
print("The final double amount value is:",FF, "after",SeventyTwo_function(72,UV),
"years of investment.")

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

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 




Tuesday, June 9, 2020

Python Class 149 (Average Power) - Kapil Sharma

print ("*** Application for Average Power Calculator ***")

print ("\n")

EV = float(input("Please enter the Energy in joules value:"))
TV = float(input("Please enter the time period in seconds value:"))

P = EV / TV

print ("Total average power P in watts (W) is", (P))



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

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

Saturday, June 6, 2020

Python Class 144 (Profit Margin) - Kapil Sharma

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

NP1 = float(input("Please enter Net Profit After Tax value:"))
NS2 = float(input("Please enter Net Sales value:"))

#Profit Margin Formula = Net Profit After Tax / Net Sales 

print ("The Profit Margin is:",(ProfitMargin_function(NP1, NS2)))


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

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 142 (Tax Rate for Corporation) - Kapil Sharma

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

TE1 = float(input("Please enter total Tax Expenses value:"))
ET2 = float(input("Please enter total Earnings Before Taxes value:"))

#Effective Tax Rate for Corporation = Total Tax Expenses / Earnings Before Taxes

print ("The Effective Tax Rate for Corporation is:",(TaxRate_function(TE1, ET2)))



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

https://github.com/bornfreesoul/PythonLessons

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

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

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


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 134 (Yield) - Kapil Sharma

#Yield Calculator Application:-

def Yield_function1(n1,n2):
            return (n1*n2)
 
MV1 = float(input("Please enter the monthly dividend value:"))
TM2 = float(input("Please enter the total month count:"))

print ("The annual yield value is (AYV):" , (Yield_function1(MV1,TM2)))

print("\n")

def Yield_function2(n1,n2):
            return (n1/n2)
 
AYV2 = float(input("Please enter the annual yield value (AYV):"))
CV1 = float(input("Please enter the current value:"))

print ("The annual yield value is (AYV) %:" , (Yield_function2(AYV2,CV1)))



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

https://github.com/bornfreesoul/PythonLessons

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

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



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