Series of python with me!

Hello, fellow learners and curious minds! In the long vacation of a festival, I’ll be doing Python from scratch as I am new to it. I’ll be covering all the things I learned each day in the hope that my journey can inspire and assist others who are just starting or thinking about taking the plunge into coding. So, join me as I share my first-day reflections on this exciting adventure.

So, yeah let’s start day 1> with a cup of coffee.

Day 1

Introduction to programming and Python with variables and datatypes

Before jumping right into pieces of code, one must know what programming is.

Programming, in the broadest sense, is a creative and problem-solving process that involves instructing a computer to perform tasks. These instructions are given in the form of code, a set of specific commands written in a programming language. Programming is the foundation of software development, enabling us to build applications, websites, games, and more. Programming languages, such as Python, Java, C++, and JavaScript, serve as the tools through which programmers communicate with computers. Whether you’re an aspiring developer, a problem solver, or just curious about the world of coding, learning to program opens doors to a universe of possibilities. It’s a journey of constant learning and innovation, where you can bring your ideas to life and shape the digital world. So, if you’re ready to embark on this exciting adventure, let’s delve deeper into the realm of programming and discover its endless potential.

So, time to know about Python> What python is?

Python is the class clown of programming, always cracking jokes with its clean and straightforward code. It’s that one friend who says, “Why overcomplicate things when we can keep it simple?” Python has an infamous love for whitespace, and its “Zen of Python” is like its guiding philosophy. It’s the language that tells a joke in the form of code and never forgets to indent its punchlines. But beneath the humor, Python is a versatile superstar, capable of everything from web development to data analysis. It’s the language that keeps you entertained while it works its magic. Python is like having your cake and eating it too, with an extra sprinkle of humor!

Now that we’ve had our fun with Python’s humorous side, let’s delve into the more serious reasons why you should consider learning Python:

Python’s Practical Prowess:

Beyond the laughs, Python is a workhorse in the tech world. Here’s why one should give it a serious thought:

Versatility: Python’s adaptability is remarkable. It can tackle a wide range of tasks, from building websites and mobile apps to automating repetitive tasks and analyzing large datasets.

Gentle Learning Curve: Its straightforward and clear syntax makes it ideal for beginners. You won’t get overwhelmed with cryptic code, and you can focus on learning programming concepts.

Active Community: Python boasts a thriving community that’s not only welcoming but also supportive. You’ll find answers to your questions, tons of tutorials, and an abundance of open-source libraries and frameworks.

Real-World Applications: Python is not just a classroom language; it’s used by tech giants like Google, Facebook, and Instagram. It’s the driving force behind scientific research, data analysis, and cybersecurity.

Job Opportunities: Learning Python can open doors to various job opportunities, from web developer and data analyst to machine learning engineer and cybersecurity expert.

Why Python? The Serious Answer:

Python’s versatility and user-friendly set it apart from other programming languages. Whether you’re looking to build a tech career or just solve everyday problems, Python provides the tools and resources to do so effectively. Its simplicity doesn’t compromise its power, making it an excellent choice for both beginners and seasoned developers. So, when it comes to choosing a programming language, Python offers both a playful side and a solid foundation for real-world success. It’s the best of both worlds, wrapped up in one dynamic package.

Now time to shake hand with Python.

Hoping that you did shake your hand with the python (snake) above, let's install the programming one. Without wasting our irreversible time let you install and set up your python with a code editor through this > click here.

Writing our first Python code

print("Hello world!")

Resources

I’ll be following Bro Code and his Python playlist.


Variable

Taking an example of a water bottle as a container, A variable is a container that stores value, as a bottle stores water or any form of liquid. An example of a variable is shown below, hope you create your own!

#so anything that stores values is container, and a container that stores values is variable 

# here we will be making variable as medium and assign it a particular value "Happy"

# lets print the value 

medium="Happy" #one must use double quotation for string and anything between double quotaion is said to be string 

print(medium + "or Sad") # + is used to concatinate 2 string; adding 2 strings to a single one

To know the type of data; data type!

Data types:

Data types are types of data from which the programmers/ us used to operate based on the type of data.
Some of the data types are explained below: -

Integers(int): - These are whole numbers, and we can use the integer to assign values like 1,2,3,4…

Floating(float): - These are real numbers, and we can use the float to assign values like 1.2,2.2,3.2 …

String(str): - These are words or numbers enclosed in the double quotation, and we can use the string to assign values like “Ram”, and “100” …

Boolean(bool): - These are values that represent either of the given words or things as true or false. They are used for making decisions or logical operations. We can assign a true value or false value to a particular set of instructions.

# for string

medium="Happy"

print(type(medium)) #it will print the output as str type, to check the (assign) type of data type of data use type()



# for int

height = 5 

height = height + 5 #|| height +=5 # || symbol is or but compiler will trigger it

print(type(height)) # it will print the output as int type

   #if we want to replace int 5 as a string then we have to change the height part as height + type of string i.e. str(5)

height = "5" 

height = height + str(5)

print(type(height)) # it will print the output is str due to the use of typecasting which i'll be covering up soon 



#for float

meter= 5.6 

meter= meter+ 5 #|| height +=5 # || symbol is or but compiler will trigger it

print(type(meter))# it will print the output as float 



#for boolean

medium= True #here we assign true value for medium 

print(type(medium))# it will print the output as bool

With an understanding of Python and programming, and what variables and datatypes, we are concluding our day first with an exercise of asking (taking input) and printing our name, hope you research and come with excitement.

Below is an example!!

Medium=input("What is your name"); #here medium is a container that stores values

print("My name is", Medium );

Happy learning!