Showing posts with label raw_input. Show all posts
Showing posts with label raw_input. Show all posts

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 



Wednesday, June 17, 2020

Python Class 159 (Markup Value) - Kapil

print ("*** Application to calculate the Markup Value ***")

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

print ("\n")

#Markup = Gross Profit / Cost

GPV = float(input("Please enter the gross profit value:"))
CV = float(input("Please enter the cost value:"))

print("The markup value is:",(MV_function(GPV, CV)))



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

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 




Friday, May 8, 2020

Python Class 111 - Kapil Sharma

#List[] is same like Array (series) of random data and its changeable (mutable)
myFoods1 = ["Bread","Wheat","Rice"]
print(myFoods)
print(myFoods[2])
myFoods.append("Garlic")
print(myFoods)
myFoods.pop(1)
print(myFoods)

myFoods2 = ["Bread","Wheat","Rice"]
print(myFoods2[0:2])
print(myFoods2[:1])
print(myFoods2[0:])

#length, maximum, minimum functions
myPhone1 =["Samsung", "Apple", "LG"]
print(myPhone1)
print(len(myPhone1))
print(max(myPhone1))
print(min(myPhone1))
print(sorted(myPhone1))
print(sorted(myPhone1,reverse=True))

#Raw Input feature
from pip._vendor.distlib.compat import raw_input

name1 = raw_input("Please enter your age:")

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