0% found this document useful (0 votes)
4 views2 pages

Python Theory

The document provides an overview of object-oriented programming concepts, including definitions of objects, attributes, and core Python classes. It also covers key programming principles such as dynamic typing, modularity, and self-documenting code. Additionally, it explains loops, iterations, and specific keywords used in Python programming.

Uploaded by

aswinisingh178
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Python Theory

The document provides an overview of object-oriented programming concepts, including definitions of objects, attributes, and core Python classes. It also covers key programming principles such as dynamic typing, modularity, and self-documenting code. Additionally, it explains loops, iterations, and specific keywords used in Python programming.

Uploaded by

aswinisingh178
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Object-oriented programming

A programming system that is based around objects, which can contain both data and code that
manipulates that data.

Object

An instance of a class; a fundamental building block of python.

Dot notation

How to access the methods and attributes that belong to an instance of a class.

Core python classes

 Integers
 Floats
 Strings
 Booleans
 Lists
 Dictionaries
 Tuples
 Sets
 Frozen sets
 Functions
 Ranges
 None

Attribute

A value associated with an object or class which is referenced by name using dot notation.

Data type

An attribute that describes a piece of data based on its values its programming language, or the
operation it can perform

Dynamic typing

Variable can point to objects of any data type.

Naming conventions

Consistent guidelines that describe the content, creation data, and version of a file in its name.

Keyword

A special word that is reserved for a specific purpose and that can only be used for that purpose.

String

A sequence of character and punctuation that contain textual information.

Immutable data type


A data type in which the values can never be altered or updated.

Float

A data type that represents number that contain decimals.

Implicit conversion

Python automatically converts one data type to another without user involvement

Modularity

The ability to write code in separate components that work together and that can be reused for
other programs

Refactoring

The process of restructuring code while maintaining its original functionality

Self-documenting code

Code written in a way that is readable and make its purpose clear.

Doc string

A string at the beginning of a function’s body that summarizes the function’s behaviour and explains
its arguments and return values.

Loop

A block of code used to carry out iterations.

Iteration

The repeated execution of a set of statements, where one iteration is the single execution of a block
code.

While loop

A loop that instructs your computer to continuously execute your code based on the value of a
condition.

Break

A keyword that lets you escape a loop without triggering any ELSE statement that follows it in the
loop

You might also like