trilok sharma - Study24x7
Social learning Network
trilok sharma Cover image
trilok sharma
trilok sharma
Connections 45
Followers 88
Following 65
study24x7trilok sharma

trilok sharma

Studied b e at University of Rajasthan
Live in Kota,India, Rajasthan
  • Profile
  • About
  • Connections
About

23 May 2019 05:02 PM study24x7 study24x7

Compare Accessibility of Python and Java • Java is a static and strong type definition language. Java has strict definition of accessibility type with keywords. • While Python is a dynamic and weak type definition language. Python acquiesces all the accessibility types are pu...

See more

study24x7
Write a comment
23 May 2019 05:02 PM study24x7 study24x7

Polymorphism • Polymorphism is an important definition in OOP. Absolutely, we can realize polymorphism in Python just like in JAVA. I call it “traditional polymorphism” • In the next slide, there is an example of polymorphism in Python. • But in Python,

study24x7
Write a comment
23 May 2019 05:02 PM study24x7 study24x7

Encapsulation – Accessibility (1) • In Python, there is no keywords like ‘public’, ‘protected’ and ‘private’ to define the accessibility. In other words, In Python, it acquiesce that all attributes are public.

study24x7
Write a comment
23 May 2019 05:02 PM study24x7 study24x7

An Example of Multiple Inheritance C multiple-inherit A and B, but since A is in the left of B, so C inherit A and invoke A.A() according to the left-to-right sequence. To implement C.B(), class A does not have B() method, so C inherit B for the second priority. So C.B() actually...

See more

study24x7
Write a comment
23 May 2019 05:01 PM study24x7 study24x7

Form and Object for Class • Class includes two members: form and object. • The example in the following can reflect what is the difference between object and form for class.

study24x7
Write a comment
23 May 2019 05:01 PM study24x7 study24x7

Class Definition and Object Instantiation • Class definition syntax: class subclass[(superclass)]: [attributes and methods] • Object instantiation syntax: object = class() • Attributes and methods invoke: object.attribute object.method()

study24x7
Write a comment
23 May 2019 05:00 PM study24x7 study24x7

Advantages of Python • Simple • Easy to study • Free and open source • High-level programming language • Portability • Expansibility • Embedability • Large and comprehensive standard libraries • Canonical code

study24x7
Write a comment
23 May 2019 04:51 PM study24x7 study24x7

python classes

python_classes_objects.pdf
1 Downloads
study24x7
Write a comment
23 May 2019 10:14 AM study24x7 study24x7

 To add a new element to a list we use which command ?

A

list1.add(5)

B

list1.append(5)

C

list1.addLast(5)

D

list1.addEnd(5)

study24x7
Write a comment
23 May 2019 10:13 AM study24x7 study24x7

Suppose list1 is [1, 3, 2], What is list1 * 2 ?

A

[2, 6, 4].

B

[1, 3, 2, 1, 3].

C

[1, 3, 2, 1, 3, 2] .

D

[1, 3, 2, 3, 2, 1].

study24x7
Write a comment