Python Day 2

 Python Continued...



Python is procedural oriented as well as object oriented programming language. We will discuss what they both mean but in Programming there are 2 types of programming,


1. Object oriented

2. Procedural oriented


So what are they?


Procedural oriented programming language is a programming language that is step by step approaching and a language that uses classes and objects.

Example:


m1()

{

-> Logic

}

m2()

{

->Logic

}

Main()


Example of Procedural Oriented Programming Language:

*C languages

Due to the limitations of Procedural Oriented Programming Language, experts have introduced a new programming language known a Object Oriented Programming Language. 


What is Object oriented Programming language?

A language that comprises of classes and objects. 


Class c1

{

m1 ()

{

->logic

}

m2()

{

->logic

}

{

class c2

{

Main()

c1.m1()

c1.m2()


Example for object oriented programming language

*C#.NET

*Java

*Perl


Why is python both a procedural oriented and object oriented programming language?

In python we can write a program without class which only functions it supports procedural oriented so python is procedural and object oriented.



Python is dynamically types programming language which means that while declaring variables, the programmer doesn't have to require to declare data type will be deciding dynamically when initialize value. Example

if initialize num vals data type = int

if initialize float val data type = float 


a = 10

type(a)

<class 'int'>


b = 100.100


type(b)


<class 'float'>


To view or add a comment, sign in

More articles by Sam Bhusal

  • AWS Questions - 10/6/2021

    What is Cloud computing ? Cloud computing is the distribution of computing services like storages, databases, software,…

  • Day 5 Python

    Day 5 Python How to be successful in python? To practice and practice. Programming using variables What is variable?…

  • Day 3 of Flutter

    Dart pad debug console and terminal instead of just writing print Life is beautiful 3 times like this print("Life is…

  • Day 14 of flutter class

    1)What is statelesswidget ? A stateless widget in flutter is is defined as any widget which changes its state within…

  • JSON and API, etc …

    What is API and how to create own API? The set of functions and procedures allowing the creation of applications that…

  • Day 1 of AWS 10/12/2020

    What is Cloud computing ? Cloud computing is the distribution of many distinct services. How AWS cloud is different…

  • Day 1 Intro to Python

    Day 1 Session 1 Before beginning Python we should first address some questions that generally arouse in first time…

  • Intro to Linux/Unix 3/21/2021 Overview

    Chapter 1 The Standard Boot process for PC Power to Computer The Basic Input/output system (BIOS) is read from a chip…

Explore content categories