Showing posts with label github. Show all posts
Showing posts with label github. 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

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

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

Sunday, July 12, 2020

Python Class 173 (Money Call Calculator, Part-IV) - Kapil

while loop == 1:
    x = input("Press 0 to exit otherwise anything to continue:")
    if x == "0":
      break

    print ("*** Money Application ***")
    print("\n")
    print("Money Call")

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

Python Class 171 (Money Double Calculator, Part-II) - Kapil

print("*** 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 is:",SeventyTwo_function(72,UV))




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

https://github.com/bornfreesoul/PythonLessons

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

Saturday, June 20, 2020

Python Class 163 (Fahrenheit Temperature) - Kapil

print(" **** Application to calculate Fahrenheit Temperature. **** ") print("\n") #F = (C * 1.8) + 32 CV = float(input("Please enter the Temperature in Celsius: ")) FV = (CV * 1.8) + 32 print("The Temperature in Fahrenheit is:",FV)


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

https://github.com/bornfreesoul/PythonLessons

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


Friday, June 19, 2020

Python Class 162 (Surface Tension) - Kapil

print(" **** Application to calculate surface tension. **** ")

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

print("\n")
#T = F/L

FV = float(input("Please enter the force per unit length in Newton: "))
LV = float(input("Please enter length in which force act in per Meter: "))

print("The surface tension of the liquid:", force_function(FV, LV), "N/m")


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

https://github.com/bornfreesoul/PythonLessons

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



Saturday, May 23, 2020

Python Class 130 - Kapil Sharma

#Example of Rectangle Area function:- 

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

WV1 = float(input("Please enter width value:"))
LV2 = float(input("Please enter length value:"))

print ("Area of the triangle is:" , (Rectangle_area(WV1, LV2)))




Monday, May 18, 2020

Python Class 123 - Kapil Sharma

def add_function(num1, num2):
    return num1+num2


Nv1 = float(input("Please enter first amount:"))
Nv2 = float(input("Please enter second amount:"))

result = add_function(Nv1, Nv2)
print(result)



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

https://github.com/bornfreesoul/PythonLessons

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

Saturday, May 16, 2020

Python Class 121 - Kapil Sharma


from pip._vendor.distlib.compat import raw_input

myValue1 = float(raw_input("Please enter the first value, user wants to add:"))
myValue2 = float(raw_input("Please enter the second value, user wants to add:"))
Result = (myValue1 + myValue2)
print(Result)


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

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

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, January 19, 2015

Python Class 105 - Kapil Sharma

Python Information Cheat Sheet:

1) python –V   or  python –version  #This shows the current installed python version.

2) pip freeze will output a list of installed packages and their versions.

3) pip install django  #This will install django framework.
 pip install django –upgrade #For Django upgrade.

4) Literal Constants - An example of a literal constant is a number like 5, 1.23, 9.25e-3 or a string like 'This is a string' or "It's a string!". It is called a literal because it is literal - you use its value literally.

5) Numbers - In Python are of four types - integers, long integers, floating point and complex numbers.

6) Strings - A string is a sequence of characters. Strings are basically just a bunch of words.

7) Variables - Their value can vary i.e. you can store anything using a variable. 

8) Identifier Naming - Variables are examples of identifiers. Identifiers are names given to identify something.

9) Data Types - Variables can hold values of different types called data types. The basic types are numbers and strings.

10) Objects - Python refers to anything used in a program as an object. 

11) Logical and Physical Lines - A physical line is what you see when you write the program. A logical line is what Python sees as a single statement. Python implicitly assumes that each physical line corresponds to a logical line.

12) Indentation - Actually, whitespace at the beginning of the line is important. This is called indentation. Use a single tab.

13) Operators - Operators are functionality that do something and can be represented by symbols.

14) Operator Precedence – PMDAS order by which math operation executed.

15) The if statement - The if statement is used to check a condition and if the condition is true, we run a block of statements (called the if-block), else we process another block of statements (called the else-block). The else clause is optional.

16) The while statement - The while statement allows you to repeatedly execute a block of statements as long as a condition is true. A while statement is an example of what is called a looping statement. A while statement can have an optional else clause. 

17) The for loop - The for..in statement is another looping statement which iterates over a sequence of objects i.e. go through each item in a sequence. 

18) The break statement - The break statement is used to break out of a loop statement i.e. stop the execution of a looping statement, even if the loop condition has not become False or the sequence of items has been completely iterated over. An important note is that if you break out of a for or while loop, any corresponding loop else block is not executed.

19) The continue statement - The continue statement is used to tell Python to skip the rest of the statements in the current loop block and to continue to the next iteration of the loop.

GitHub: 
https://github.com/bornfreesoul/Python/blob/master/BasicOne

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