#Day 13 Python For Beginners.

#Day 13 Python For Beginners.

What is Python?

  • Python is an 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.

Python is one of the programming languages that fills the gap between computers and humans, to talk with the computer we need a programming language that will act as an intermediator between computer and humans since computers understand the binary language (1001010100010) which humans don't and humans understand the language which computer doesn't.
Here Programming language comes to the rescue because they are built to communicate with computers and return an output on the screen in the language that we humans understand. All this is performed by an interpreter of the programming language which converts the human input into binary and computer output into human-readable format, or language.

Why Python

Python is widely used across various industries for web development, data science, artificial intelligence, automation, and more. It's known for its simplicity, reliability, readability & versatility.

Syntax

Python syntax refers to the rules & structure of the language. It's important to follow Python's syntax and rules for the code to work correctly.

Python Character set

There are certain characters only that Python understands, which are as below.

  • Letters - A to Z, a to z

  • Digits - 0 to 9

  • Special Symbols - +,-,*,/ etc

  • Whitespaces - BlankSpace, tab, carriage return newline, formfeed.

  • Other characters - Python can process all ASCII and Unicode characters as part of data or literals.

Variables & Data Types

Variables are used to store data in a program, every variable has a name and holds a value.

Like we did in maths x=5, a=2 to solve the maths equations, here x is our variable name and 5 is a value assigned to it. Same works in a programming language. If we need to store a value in a variable we need to write it in a program.

name = "Umesh", Age = 26, marks = 16.87

Here name, Age, and marks are the names of variables & "Umesh", 26, 16.87 are the values assigned to variables.

Data Types -

Python Data types can be broadly classified into two categories.

Premitive

built in data types.

Primitive Data Types.

Primitive data types, also known as basic data types or elementary data types, are the fundamental data types provided by a programming language. These data types are directly supported by the programming language itself and are not composed of other data types. They are typically used to represent simple values and are often used as building blocks for more complex data structures.

The term "primitive" implies that these data types are fundamental and not built from other data types. They are usually implemented directly by the programming language and are typically optimized for performance.

  1. Integer - (int)

    Integer contains all whole positive and negative values.

    (23, 56, 87, -100, -2, -288282, 3234)

  2. Float - (float)

    Represents real numbers with a decimal point, such as.

    (3.123, -0.001, 3.56)

  3. String (str)

    They are indeed primitive data types and are directly supported by the language. Examples include. ("Umesh", "Hello", "My name is Umesh"

  4. Boolean - (bool)

    Boolean data type represents truth values, either True or False. Booleans are used for logical operations, comparisons, and control flow in Python programs. They are fundamental to decision-making and conditional execution in programming. (True, False)

None - (none)

It represents the area where we do not want to store any value.

(a=none) = Here a simply does not contain any value)

Built-in data types.

  1. Lists (list): Represents ordered collections of items. Lists can contain elements of different data types and are mutable (modifiable).

  2. Tuples(tuple): Represents ordered collections of items, similar to lists but immutable (unchangeable).

  3. Dictionaries (dict): Represents collections of key-value pairs, where each key is associated with a value. Dictionaries are unordered and mutable.

  4. Sets (set): Represents collections of unique items. Sets are unordered and mutable, and they do not allow duplicate elements.

Keywords

Keywords are reserved words in Python, in English we have a dictionary that contains the words which have a fixed meaning. The same python has its own dictionary which has reserved words that are stored.

(we cannot use the below words to declare a variable name or like that)


Thank you for joining me on this journey into DevOps! Your curiosity is the driving force behind this exploration. If you found value in these insights, I'm thrilled! Keep the DevOps flame alive, and stay tuned for more exciting adventures in the world of technology. Happy Learning! 🚀✨"

"Closing the gap between us—let's connect and make our virtual bond stronger on social media!

Click on -Umesh Salunkhe