Posts

Mutable and Immutable Objects

Image
Every thing in python is object. We have to understand all the data represented in python is by object. This object can be immutable or mutable. Immutable Objects are those which can't be changed . Ex:- Int, Float, Complex, String, Tuple, Frozen set. [note: immutable version of set], bytes. Mutable Objects are :- List, Dict, Set, Byte array etc. Immutable Ex:- my_yuple = (10, 20, 30) print(my_yuple) output (10, 20, 30) continue... my_yuple = (10, 20, 30) my_yuple[0] = 40  - - - We are trying to change the first position data. print(my_yuple) output: File "test.py", line 3, in < module > my_yuple[0] = 40 TypeError: 'tuple' object does not support item assignment

Everything is an Object in Python Programming - Data Types !!!

Image
What is a data type in Python? Data types are the classification or categorization of data items. It represents the kind of value that tells what operations can be performed on a particular data. Since everything is an object in Python programming, data types are actually classes and variables are instance (object) of these classes. Text Type: str Numeric Types: int , float , complex Sequence Types: list , tuple , range Mapping Type: dict Set Types: set , frozenset Boolean Type: bool Binary Types: bytes , bytearray , memoryview

Link to download Python

Click on the below link, Select the Operating System whichever you are using and download and make the necessary settings. https://www.python.org/downloads/

What is to be known before you start Python Coding!!

Code Everyday Consistency is very important when you are learning a new language. We recommend making a commitment to code every day. It may be hard to believe, but muscle memory plays a large part in programming. Committing to coding everyday will really help develop that muscle memory. Though it may seem daunting at first, consider starting small with 25 minutes everyday and working your way up from there. Write It Out As you progress on your journey as a new programmer, you may wonder if you should be taking notes. Yes, you should! In fact, research suggests that taking notes by hand is most beneficial for long-term retention. This will be especially beneficial for those working towards the goal of becoming a full-time developer, as many interviews will involve writing code on a whiteboard. Once you start working on small projects and programs, writing by hand can also help you plan your code before you move to the computer. You can save a lot of time if you

So What is Python!!!

What if Python? Python is an interpreted, object-oriented, high-level programming language with dynamic semantics Python is described in the below words and lets see what are those in detail: Interpreter: Most programs are written in a high-level language such as C, Perl , or Java. Just as a human language makes it easy for people to communicate with one another, so computer languages simplify the job of telling a computer what to do. However, because a computer only understands numbers, talking to one is like speaking to someone with whom you don't share a language. You need a translator to properly communicate, and that's what interpreters do. An interpreted language is a type of programming language for which most of its implementations execute instructions directly and freely, without previously compiling a program into machine-language instructions. The interpreter executes the program directly, translating each statement into a sequence of one or more subr