What is Python?
ANS: Python is a high-level programming language known for its simplicity and readability, often used for various applications, including web development, data analysis, and automation.
- Python is a Open source, general purpose, high level, and object-oriented programming language.
- It was created by Guido van Rossum
- Python consists of vast libraries and various frameworks like Django,Tensorflow, Flask, Pandas, Keras etc.
How to Install Python?
ANS: For windows: You can access the Python website, where you'll find the Python download link readily available.
For Ubuntu: Windows Installation:
Visit the official Python website (https://www.python.org/downloads/windows/).
Download the latest Python installer for Windows.
Run the installer and follow the on-screen instructions.
Make sure to check the "Add Python to PATH" option during installation to make Python accessible from the command line.
Ubuntu Installation:
Python is pre-installed on most modern versions of Ubuntu. To install Python 3.6, you can use the following command:
sudo apt-get install python3.6
CentOS Installation:
Python is also available on CentOS, and you can install it using the package manager, yum. For Python 3.6 installation, run the following command:
sudo yum install python36
After installing Python, you can verify the installation by opening your terminal or command prompt and running the following command:
python --version
This command will display the installed Python version, confirming that Python is correctly installed on your system.
Task 1: Install Python and Explore Data Types
Now that you have Python installed on your system, it's time to delve into Python's data types. Python provides various built-in data types to store and manipulate different types of data. These data types include:
. Integer (int): Represents whole numbers, like 7 or -42.
▪️ Float (float): Represents decimal numbers, like 3.14 or -0.5.
▪️ String (str): Represents text or a sequence of characters, like "Hello, World!".
▪️ Boolean (bool): Represents either True or False.
▪️ List: An ordered collection of items that can be of different data types.
▪️ Tuple: Similar to a list but immutable, meaning its elements cannot be changed once defined.
▪️ Dictionary (dict): Stores data in key-value pairs.
▪️ Set: An unordered collection of unique items.
▪️ NoneType (None): Represents the absence of a value or a null value.
▪️ Complex (complex): Represents complex numbers with a real and an imaginary part.
I'm presently in the 13 day of my DevOps journey, fully immersed in DevOps methodologies, and benefiting from the guidance of Sir Shubham Londhe as my source of learning.