Python for Data Analytics • Lesson 1

Introduction to Python

Your first steps in Python: printing output, storing values in variables, understanding the core types and running simple calculations.

Your progress0%

0 of 8 concepts completed

Complete the activity and related MCQ to unlock the next concept.

Concept 1WHY PYTHON

What Is Python?

Python is a general-purpose programming language known for readable syntax. Analysts use it to clean data, run calculations, automate reports and connect to databases and dashboards.

Learn by Seeing

Where Python fits in analytics

Raw data → Python → Clean data
                 ↓
             Calculations
                 ↓
             Report / dashboard

Python is the tool that sits between raw data and a finished business report.

Click a stage to explore the workflow:

Raw data

Messy customer rows, inconsistent names, missing values — the starting point.

Interactive Activity

Which task is Python most commonly used for in analytics?

Hint: Think about the work analysts do between raw data and a report.

Python Analyst Mindset

Small scripts, real results

Analysts rarely write big programs. They write small, focused scripts that compute a number, clean a field, or produce a line of a report. The pieces you learned today — print, variables, types, arithmetic — are the building blocks of every one of them.

01

Store

Put values in variables.

02

Calculate

Use +, -, *, / to get answers.

03

Format

Combine text and numbers with str().

04

Print

Show the result.

Frequently Asked Questions

Python Basics — FAQs

Do I need quotes for every value in print()?

No. Quotes are only for text (strings). Numbers and other types can be printed directly: print(42).

Why does 76700 / 5 give 15340.0 with a .0?

Python's / always returns a float, even when the division is exact. Use // if you want an integer result.

Why does "Total: " + 76700 fail?

The + operator requires both sides to be the same type. Wrap the number in str() to convert it to text first.

What is the difference between int and float?

int holds whole numbers like 42. float holds numbers with a decimal point like 1499.99.

Lesson Summary

What you learned

print()

Show a value in the output.

Variables

Named labels that store values.

Types: str, int, float, bool

Each value has a type that decides what you can do with it.

Arithmetic and strings

Numbers compute; strings concatenate; str() converts.