Member-only story

Day 1: Python Basics

Bishwas Jha
2 min readDec 16, 2023

--

Welcome to the first day of our machine learning expedition! Today, we’re setting the stage for our future AI feats by diving into the core of Python programming.

Python Installation and Setup Before we conjure spells in Python, let’s set up our wizard’s workshop. Head over to the official Python website and download the latest version for your operating system. During installation, ensure you tick the box that says “Add Python to PATH” to invoke Python from your command line easily.

Variables and Data Types In Python, a variable is a name tied to a value. It’s like a label on a potion bottle in a wizard’s lair. You don’t need to explicitly declare the type of potion (or variable) beforehand — Python is dynamically-typed, which means it understands the type of variable at runtime.

# A string variable
wizard_name = "Gandalf"
# An integer variable
wizard_age = 2019
# A floating point variable
wizard_height = 5.9
# A boolean variable
is_wizard = True

Control Structures Control structures guide the flow of your Python program, much like a map guides a journey.

  • If-else statement: It’s the crossroad where your program decides which path to take based on a condition.
if wizard_age > 100:
print("This wizard is wise beyond centuries!")
else:
print("A young wizard apprentice.")

--

--

Bishwas Jha
Bishwas Jha

Written by Bishwas Jha

Engineer with expertise in Cloud, DevOps , Blockchain& more. I like to share my learning journey with projects and projects that can save our time.

No responses yet