Beginners Guide to Python: Day 1 Learning and Exploring IPython

Table of contents
- Hey there, future Pythonista! ๐
- ๐ What is Python, and Why Should You Care?
- ๐ ๏ธ Setting Up Python and IPython (The Fun Way!)
- ๐จโ๐ป Writing Your First Python Program
- ๐ Playing with Variables in IPython
- โ Doing Math in Python (Like a Calculator!)
- ๐ Why IPython is Awesome
- ๐ฏ Homework: Practice & Explore
- ๐ Whatโs Coming Next?
- ๐ Final Thoughts: You Did It!
Hey there, future Pythonista! ๐
Welcome to the world of Python programming! If you've ever wanted to learn how to code but didn't know where to start, you're in the right place. Python is one of the easiest, most powerful, and widely used programming languages out there, and today, we're taking our first step together.
By the end of this lesson, youโll:
โ
Understand what Python is and why it's awesome.
โ
Set up your Python environment with IPython.
โ
Write your first Python program.
โ
Explore basic Python concepts like variables and math operations.
Letโs dive in and make learning Python fun! ๐
๐ What is Python, and Why Should You Care?
Python is a high-level, beginner-friendly programming language used for web development, data science, automation, AI, and more. Hereโs why millions of developers love Python:
โ๏ธ Simple & Readable โ The syntax is close to English!
โ๏ธ Versatile โ You can build websites, analyze data, or even automate tasks.
โ๏ธ Huge Community โ Tons of resources and support.
โ๏ธ Powerful Libraries โ Pre-built tools for almost everything!
It was created by Guido van Rossum in 1991 and has since become one of the most popular languages in the world. Whether you want to become a software engineer, a data scientist, or an automation wizard, Python is the perfect starting point.
๐ ๏ธ Setting Up Python and IPython (The Fun Way!)
To write and run Python code, we need a coding environment. Instead of using the boring default Python shell, we'll use IPython, which makes coding faster, smarter, and more fun!
Step 1: Check if Python is Installed
Open your terminal (Command Prompt on Windows, Terminal on macOS/Linux) and type:
python --version
or
python3 --version
If Python is not installed, download and install it from Python.org.
Step 2: Install IPython
Once Python is installed, open your terminal and type:
pip install ipython
Step 3: Launch IPython
After installation, start IPython by running:
ipython
Now, you should see a fancy Python prompt like this:
In [1]:
You're now inside IPython, an interactive Python shell where you can write, test, and run code dynamically! ๐
๐จโ๐ป Writing Your First Python Program
Time to write some actual code! Open IPython and type:
print("Hello, Python World!")
Press Enter, and you should see:
Hello, Python World!
๐ Congratulations! You just wrote your first Python program! ๐
๐ก What Just Happened?
- The
print()
function displays text on the screen. "Hello, Python World!"
is a string (text data in Python).
Thatโs it! Youโre already coding in Python. ๐ฅ
๐ Playing with Variables in IPython
Python lets you store information in variables so you can use it later. Try this in IPython:
name = "Alice" # A string
age = 25 # An integer
height = 5.6 # A float (decimal number)
is_student = True # A boolean (True/False)
Now, type the variable name and hit Enter to see its value:
name
Output:
'Alice'
You can also check what type of data is stored in a variable:
type(age)
Output:
<class 'int'>
โ Integers (int
) store whole numbers.
โ Floats (float
) store decimal numbers.
โ Strings (str
) store text.
โ Booleans (bool
) store True
or False
.
โ Doing Math in Python (Like a Calculator!)
Python can handle basic arithmetic like a calculator. Try this:
5 + 3 # Addition
10 - 2 # Subtraction
4 * 3 # Multiplication
8 / 2 # Division
10 % 3 # Modulus (Remainder)
Want to store results?
result = 10 * 5
print(result)
Output:
50
โ Python remembers your calculations so you can use them later!
๐ Why IPython is Awesome
IPython is not just any Python shellโit has superpowers! ๐ฆธ
โ
Auto-completion โ Press Tab
to complete commands.
โ
Syntax Highlighting โ Makes your code more readable.
โ
Magic Commands โ Special shortcuts to speed up your work.
โณ Measure Execution Time in IPython
Ever wondered how fast your code runs? Try this:
%timeit sum(range(1000))
This tells you how long it takes to execute the operation. Super useful! ๐
๐ฏ Homework: Practice & Explore
To make sure you really understand today's lesson, try these exercises in IPython:
1๏ธโฃ Assign your name, age, and favorite food to variables.
2๏ธโฃ Perform basic math and store the results in a variable.
3๏ธโฃ Use the type()
function to check the data types of different variables.
4๏ธโฃ Take user input and print a greeting:
name = input("Enter your name: ")
print("Hello,", name)
๐ Pro Tip: Experiment and try new things in IPythonโitโs a great way to learn!
๐ Whatโs Coming Next?
Now that youโve written your first Python program, itโs time to level up! In the next lesson, weโll dive into:
โ
Lists, Tuples, and Dictionaries (Powerful ways to store data)
โ
Loops and Conditional Statements (Making Python programs smarter)
Stay tunedโthis is just the beginning! ๐
๐ Final Thoughts: You Did It!
Youโve officially taken your first step into Python programming! Whether you want to build websites, analyze data, or automate tasks, Python is your gateway to endless possibilities.
๐ Keep practicing, stay curious, and have fun!
๐ If this lesson helped you, share it with a friend who wants to learn Python!
๐ Subscribe to get the next lesson straight to your inbox!
๐ก Got any questions? Drop them in the commentsโIโd love to help! ๐
Subscribe to my newsletter
Read articles from Python JS directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Python JS
Python JS
๐ Hey, I'm Ajay Kumar Joshi โ a Python & JavaScript enthusiast passionate about breaking down complex programming concepts into simple, digestible lessons. I created PythonJS to help developers, students, and professionals learn Python and JavaScript the easy wayโthrough byte-sized lessons, real-world examples, and a structured approach to coding. ๐ Follow along as I simplify tough topics, share coding insights, and build a community of lifelong learners. ๐ Explore more at pythonjs.org