Data Science – 1 [web scraping]

Data science Data science: is the field of study that combines domain expertise, programming skills, and knowledge of mathematics and statistics to extract meaningful insights from ocean of data. Web scraping can be a solution to speed up the data collection process. Instead of looking at the job site every day, you can use Python […]

Share

Data Science – 1 [web scraping] Read More »

Multilevel, Hierarchical and Hybrid Inheritance

Multilevel, Hierarchical and Hybrid Inheritance Multi-Level Inheritance in Python #Multilevel Inheritance in Python class India: def first(self): print (‘India is the largest democratic country in the world’) class Karnataka(India): def sec(self): print (‘Karnataka is famous for IT and Coffee Production’) class Bengaluru(Karnataka): def third(self): print (‘Bengaluru also known as Garden city!’) b=Bengaluru() b.first() b.sec() b.third()

Share

Multilevel, Hierarchical and Hybrid Inheritance Read More »

Single and Multiple inheritance in Python

Single and Multiple inheritance in Python 1.  Single Inheritance  # Single Inheritance in Python with Student and Marks Details #-Base class class std_per_det: regno = input(“Enter RegNo:”) name = input(“Enter Name:”) course = input(“Enter Course:”) #Base class Method def show_std(self): print(‘Base Class value:’,self.regno) print(‘Base Class value:’,self.name) print(‘Base Class value:’,self.course) #-Derived class class marks_det(std_per_det): p=int(input(“Enter Physics

Share

Single and Multiple inheritance in Python Read More »

pip commands for python

pip(Pip Installs Packages): is a command to install various python packages. some of the following pip commands for different packages of python as well as pip upgrade. pip upgrade ———————- python -m pip install –upgrade pip to check pip version ——————————– c:\python34\scripts>pip –version [press enter, shows pip version] to install scipy ———————— c:\python34>pip install scipy

Share

pip commands for python Read More »

Built-in and user defined functions in Python

# Built-in functions in Python [importing math package] import math x=int(input(“Enter any number:”)) print(“Square root of {0} is {1}”.format(x,math.sqrt(x))) print(“Square of {0} is {1}”.format(x, x*x)) print(“Cube of {0} is {1}”.format(x, x*x*x)) OutPut: Enter any number:5 Square root of 5 is 2.23606797749979 Square of 5 is 25 Cube of 5 is 125   User-defined functions  def

Share

Built-in and user defined functions in Python Read More »

Python Programs for Beginners – Part2

Basic Python Programs for Beginners – Part 2 # program to display employee salary information name=input(“Enter Name:”) dept=input(“Enter Department:”) basic=int(input(“Enter Basic salary:”)) bonus=basic*(5/100) pf=basic*(10/100) net=basic+bonus-pf print(“Employee Details”) print(“—————————–“) print(“Name=”, name) print(“Basic=”, basic) print(“Bonus=”, bonus) print(“Provident Fund=”, pf) print(“Net salary=”, net) OUTPUT: Enter Name:Ganesh Enter Department:Finance Enter Basic salary:25000 Employee Details —————————– Name= Ganesh Basic= 25000

Share

Python Programs for Beginners – Part2 Read More »

Python Programs for Beginners – Part1

Basic Python Programs for Beginners – Part 1 Watch This Video session for How to Run your First Python Program # Sum of two numbers program on python a=int(input(“Enter Num1:”)) b=int(input(“Enter Num2:”)) c=a+b print “sum of {0} and {1} is {2}” .format(a,b,c) c=a-b print “subtraction of {0} from {1} is {2}”.format(a,b,c) c=a*b print “muliplication of

Share

Python Programs for Beginners – Part1 Read More »

Share
Scroll to Top