Posts

Python data types

 Data Types in Python Python has a number of built-in data types which are used to store different types of values.  Here is a brief overview of some of the built-in data types in Python: Integers : Integers are whole numbers, such as 1, 2, or -5. They can be used for mathematical operations and can be positive or negative. Floating-point numbers : Floating-point numbers are numbers with decimal points, such as 3.14 or -0.5. They are used for decimal arithmetic and can also be positive or negative. Strings : Strings are sequences of characters, such as "hello" or "python". They can be used to store and manipulate text data. Lists : Lists are ordered collections of items, such as [1, 2, 3] or ['a', 'b', 'c']. Lists can contain items of any data type, and items can be added, removed, or modified. Dictionaries : Dictionaries are unordered collections of key-value pairs, such as {'name': 'John', 'age': 30}. Dictionaries ar...

Basics of python programming

 Overview of Python Programming The Python programming language is a high-level, interpreted language that is widely used for web development, scientific computing, data analysis, artificial intelligence, and more. It is known for its simplicity, readability, and ease of use. Here are some of the basics of the Python programming language: Data types : Python has a number of built-in data types, including integers, floating-point numbers, strings, lists, and dictionaries. Python is a dynamically-typed language, which means that you don't need to specify the data type of a variable when you declare it. Variables : Variables in Python are used to store values, and are declared by assigning a value to a name. For example: x = 5 declares a variable x and assigns it the value of 5. Variable names can contain letters, numbers, and underscores, but cannot start with a number. Control structures : Python has a number of control structures that allow you to control the flow of your program, ...

Python installation and environment setup on windows

Image
Now, all we know, what is a programming language, and why we need it. Now, how we can get started with coding? Can we use a plain text editor or wanna install any Softwares? We have to install Python to get started coding with Python and obviously every programming language has its own package installation. So, let's see how to install Python and the environment. Here we use the word environment, it is nothing than the environment in which we write, compile (convert to machine code), and run (getting output to the user). If you've already installed Python and your favorite code editor, you can skip this lesson. Installing Python Installation of python varies by the OS (Operating system), let's see how to install Python on windows. Visit python windows download page in python.org If your windows is 32 bit (x86), download from  https://www.python.org/ftp/python/3.7.7/python-3.7.7.exe  , else skip this step.  If windows is 64 bit, then download from  https:...

Python tutorial for the absolute beginners

Image
   Introduction to Python           Before we are diving to the python programming, let's discuss about programming and programming languages. What is a programming language and why we need it? The simple answer is, the programming language is a way to communicate with the computer/machine just like how we humans use various languages to communicate with each other.     So, what kind of language is known to the computer/machine? The computer knows the binary (1s and 0s). So, wanna learn a language that consists of only 1s and 0s? No, no, no..! absolutely no..! But, how we can communicate with the computer/machine? The programming language is consists of human-readable words and known as high-level programming languages. But, obviously, it is not like (very likely) normal human languages. It follows some rules and syntaxes. But, I promise you, it is very easy to learn.      If we are using a language th...