Jupyter Notebook Python is like a smart digital notebook that lets you write and run code in blocks (called “cells”). Itโs widely used in data science, machine learning, education, and automation.
With platforms like Google Colab, you donโt even need to install anything. Just visit the site, and start coding.
๐ Course Content (with Video + Code + Super Easy Explanations)
๐ฌ Introduction to the Course
- Youโll learn Python using Jupyter Notebook (Google Colab).
- No experience required.
- Everything runs in your browser.
๐๏ธ What is Jupyter Notebook?
- Itโs like a smart notebook that runs code in blocks.
- Used by Google, students, and developers.
- No installation if you use Google Colab.
๐ป Open Google Colab and Run Python
Steps:
- Go to colab.research.google.com
- Click on New Notebook
- In a code cell, type:
print("Hello, Python!")
โ This shows output in the next block.
๐ Python Variables
name = "Kunal"
age = 24
price = 19.99
print(name)
print(age)
print(price)
name
: text โ stringage
: number โ integerprice
: decimal โ float
โ Python Operators
a = 10
b = 3
print(a + b)
print(a - b)
print(a * b)
print(a / b)
print(a ** b) # power (10^3 = 1000)
+
,-
,*
,/
โ calculator stuff**
โ power
๐ Notes: Taking User Input in Python
โ
What is input()
?
The input()
function lets the user type something while the program is running.
๐งช Example:
name = input("What is your name? ")
print("Hello,", name)
๐ก What happens:
- Python shows the message:
What is your name?
- The user types something (like: Kunal)
- Python stores it in the
name
variable and prints:Hello, Kunal
๐ Important:
input()
always returns text (a string), even if you type numbers.
๐ Notes: f-Strings in Python
โ What is an f-string?
An f-string is a clean way to include variables inside a sentence.
๐งช Example:
name = "Kunal"
age = 24
print(f"My name is {name} and I am {age} years old.")
๐ก Output:
My name is Kunal and I am 24 years old.
๐ Why use f-strings?
- Easier to write
- Easier to read
- Works with text, numbers, and even calculations
๐งช Another example:
a = 10
b = 5
print(f"Total: {a + b}")
โ
Output: Total: 15
๐ง Conditional Statements โ if else
age = 18
if age >= 18:
print("You are an adult.")
else:
print("You are a minor.")
- Runs different blocks based on conditions
- Python uses indentation (spaces) for blocks
๐ Loops in Python
For Loop:
for i in range(5):
print("Number:", i)
While Loop:
x = 0
while x < 3:
print("x is", x)
x += 1
for
= fixed number of timeswhile
= until a condition is true
โ๏ธ Functions in Python
def greet(name):
print("Hello", name)
greet("Kunal")
def
creates a function- You can re-use it by calling it again
๐ฆ Lists in Python
fruits = ["apple", "banana", "mango"]
print(fruits[0])
fruits.append("orange")
print(fruits)
- List = multiple values in one variable
append()
adds items- Index starts at
0
๐งฎ Final Project: Mini Calculator
# Simple Python Calculator using input and f-strings
# Ask for user input
a = float(input("Enter the first number: "))
b = float(input("Enter the second number: "))
operation = input("Enter operation (add, subtract, multiply, divide): ")
# Define the calculator function
def calculator(a, b, operation):
if operation == "add":
return a + b
elif operation == "subtract":
return a - b
elif operation == "multiply":
return a * b
elif operation == "divide":
if b != 0:
return a / b
else:
return "Cannot divide by zero."
else:
return "Invalid operation."
# Run the function and show result using f-string
result = calculator(a, b, operation)
print(f"The result of {operation}ing {a} and {b} is: {result}")
- ๐ก Example Output:
Enter the first number: 10
Enter the second number: 5
Enter operation (add, subtract, multiply, divide):
The result of multiplying 10.0 and 5.0 is: 50.0
Combines function + if-else- Easy way to apply everything you learned
๐ค Bonus: Use ChatGPT in Jupyter
You can use comments to guide ChatGPT like this:
# ChatGPT, write a function to check if a number is even
Tools like ChatGPT or GitHub Copilot will complete the function for you.
โ Summary & Next Steps
s
If you’re searching how to get started with jupyter notebook python, this guide is the most beginner-friendly path you’ll findโno installations, just results.
๐ง Final Thoughts
You now have a solid foundation in Python using Jupyter Notebook. This method is perfect for anyone who wants to get started fast without the headache of setting things up.