Skip to main content

Posts

Showing posts from March, 2020

About Easy Pycodes

 Hi, I'm Kushal. Now I'm learning Python and Machine learning. Intrested in robotics but I'm not an IT engineer, where I found an very easy and simple language so that the reason I chose python programming language for Machine learning. During my study I faced many of problems and difficulties during making programs without import modules and with modules. So I making whole assignment in blog form where I share my knowledge to other beginners like me. Phone : (+91) 7623935068   Email id : rezkzar@gmail.com 

Class and Object

The class inheritance mechanism allows multiple base classes, a derived class can override any methods of its base class or classes, and a method can call the method of a base class with the same name. The class definition looks like : class Class_Name: Statement 1 Statement 2  ……. Statement N The statements inside a class definition will usually be function definitions, but other statements are also allowed. When a class definition is entered, a new namespace is created, and used as the local scope thus, all assignments to local variables go into this new namespace. 

How memory is managed in Python?

Memory management in Python involves a private heap containing all Python objects and data structures. The management of this private heap is ensured internally by the Python memory manager. The Python memory manager has different components which deal with various dynamic storage management aspects, like sharing, segmentation or preallocation. If some contents or data doesn't used by user for a long time it is deleted by garbage collector provided by Python.

Python program to check if variable is of integer or string

Let's say if you want to input something of any datatype and want to get datatype only of it. So... Whenever you input some data whether it is string, integer or float like this: i = input('enter something here: ') means without int, str or float put before the syntax, that time your given input is always consider as string  or if you make it like this to add int before syntax; i = int(input('enter something here: '))  it always consider as integer and gives value error when you input string and same thing happens with float, So here is a program to solve this problem of input and get datatype var = input('input to check if variable is of integer or string: ') if var.isdigit() == False:     print(type(var)) else:     var1 = int(var)     print(type(var1))

Why python ? What is Python?

Python is a generally interpreted and  interactive dynamic symmetric   high-level  object oriented programming language. It is widely used in Machine Learning today. Pretty easy to understand, learn, code and explain because it has very crisp and clear syntaxes than other languages.  Guido van Rossum made Python in 1991, named his programming language after the television show Monty Python's Flying Circus. Python has got features or derived features from ABC named programming language. Interactive - The result will be printed on the screen, immediately return, in the next line as we entered. High-level - Humans can easy to interpret; the source code contains easy-to-read syntax that is later converted into a low-level language (0 , 1) Dynamic-symmetric – Don’t need to clarify the data type. It Allows the type casting. Type Casting –  We can transform the one data type in another data type Object Oriented – language is focused on Object...