Handout
Student ID Session 2025-26 Handout No.
Student’s Name Part Session Subject ICT
Class Quarter Name Teacher’s ID e00476
Section Handout Date Teacher’s Signature Araf Mihad
Shift Comments Scratch Python Programming
Why Python ?
1) Professional Use: Used by Google, NASA, Netflix, Instagram
2) Readability: Simple, English-like syntax
3) Versatility: Web apps, games, data science, AI
4) Great for Beginners: Less complex than other languages
Remembering Things (Variables) What are Variables?
1. Named storage boxes for data
2. Label with a name, store data inside
Code:
Rules for Variable Names
1. Start with letter or underscore
2. Can contain letters, numbers, underscores
3. Case-sensitive: Score ≠ score
4. No spaces: use student_name not student name
Having Conversations (input) Getting User Input:
1) input() function pauses and waits for user
2) Always returns a string
Code:
What is Casting?
1) Converting between data types
2) Crucial for calculations with user input
Code:
Making Decisions (if/else)
Comparison Operators:
1) “==” Equal to
2) “!=" Not equal to
3) “>” Greater than
4) “<” Less than
5) “>=” Greater than or equal to
6) “<=” Less than or equal to
Example code:
Logical Operators:
1. “and” Both must be True
2. “or” At least one True
3. “not” Reverses True/False
Example :
BUILD A CALCULATOR APP:
Problem 1: BMI Calculator
Calculate BMI = weight(kg) / height(m)². Categories: Underweight(<18.5), Normal(18.5-24.9),
Overweight(25-29.9), Obese(≥30).
Problem 2: Shopping Bill Calculate total for 3 items with prices and quantities. Add 10% tax.
Problem 3: Simple Python Program to Identify Leap Years
343 North Chashara(Chanmari), Narayanganj. Ph-+88-02-7640577, E-mail-info@[Link], [Link]