Intro to Programming class — think of me as your patient, slightly excited human teacher sitting next to you with a cup of chai (since you’re in Hyderabad 😄).
I’m going to explain everything step-by-step, slowly, with lots of real-life analogies and simple examples — exactly like I would teach my younger cousin who has never coded before.
1. What even is Programming? (The most important 2-minute explanation)
Imagine you have a super obedient but very dumb robot chef at home.
- This robot knows only 100 very exact actions: “pour 200 ml water”, “turn on stove level 5”, “cut onion into exactly 8 mm pieces”, “wait 300 seconds”, etc.
- It cannot guess, it cannot think creatively, it follows instructions blindly.
- If you forget to tell it “turn off stove” → kitchen burns 🔥
- If you say “add salt” without saying how much → food becomes ocean 😭
Programming = writing very clear, step-by-step instructions (called code) that this dumb-but-fast robot (the computer) can understand and follow perfectly.
So programming is teaching a machine how to solve a problem by giving it precise orders.
2. Why do people learn programming in 2026?
- Make apps like Zomato, Instagram, Paytm
- Automate boring work (Excel → automatic report in 2 seconds)
- Build games
- Analyze data (who will win IPL? cricket predictions)
- Control robots, websites, AI tools, IoT devices, etc.
- Very high salary & work-from-anywhere jobs
But today — we start with baby steps.
3. Your First Mental Model – The Cooking Recipe Analogy
| Real recipe | Computer program |
|---|---|
| Take 2 cups rice | rice = 2 |
| Take 1 cup water | water = 1 |
| If rice > 0 and water > 0 | if rice > 0 and water > 0: |
| Put rice in cooker | put_in_cooker(rice) |
| Put water in cooker | put_in_cooker(water) |
| Wait 15 minutes | wait(15) |
| Print “Rice is ready!” | show(“Rice is ready!”) |
The computer only understands very clear sentences like above.
4. Most Important Building Blocks (The ABC of Programming)
Almost every programming language has these 7 super-important concepts:
| # | Concept | Real-life example | Programming name | Why important? |
|---|---|---|---|---|
| 1 | Variables | Boxes where you store things | variable | Store numbers, names, scores etc. |
| 2 | Data Types | Different kinds of items (sugar vs spoon) | int, float, string, bool | Computer needs to know what kind of data it is |
| 3 | Input | Asking user “What’s your name?” | input() | Get information from user |
| 4 | Output | Showing result on screen | print() | Tell user what happened |
| 5 | Arithmetic | + – × ÷ % | +, -, *, /, % | Do calculations |
| 6 | Conditions (decisions) | “If it is raining → take umbrella” | if / else | Make decisions |
| 7 | Loops (repetition) | “Stir 10 times” | for / while | Repeat actions many times without writing 10 times |
Let’s see all of them with examples in Python (easiest language for beginners in 2026).
5. Hello World + Variables + Output (Your first program!)
|
0 1 2 3 4 5 6 7 8 9 |
# This is a comment – computer ignores it # We are telling computer to show a message print("Hello Hyderabad! I just wrote my first code! 🎉") |
Now let’s use variables (named boxes):
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
name = "Webliance" # string (text) – always in quotes age = 25 # integer (whole number) height = 5.7 # float (decimal number) is_student = True # boolean (True/False) print("Hello", name) print("You are", age, "years old") print("Your height is", height, "feet") print("Are you student?", is_student) |
Output:
|
0 1 2 3 4 5 6 7 8 9 |
Hello Webliance You are 25 years old Your height is 5.7 feet Are you student? True |
6. Doing Math (Arithmetic)
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
a = 10 b = 3 print(a + b) # 13 print(a - b) # 7 print(a * b) # 30 print(a / b) # 3.33333333333 print(a // b) # 3 (integer division – removes decimal) print(a % b) # 1 (remainder – super useful!) print(a ** 2) # 100 (power – 10²) |
Real use-case: Calculate bill with discount
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 |
price = 1500 discount = 20 # percent discount_amount = price * discount / 100 final_price = price - discount_amount print("You pay only ₹", final_price) # You pay only ₹ 1200.0 |
7. Asking User (Input)
|
0 1 2 3 4 5 6 7 8 9 |
name = input("What is your good name? ") age = int(input("How old are you? ")) # convert text → number print("Hello", name, "! Next year you will be", age + 1) |
8. Making Decisions – if / else (Most powerful concept!)
|
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
marks = int(input("Enter your marks out of 100: ")) if marks >= 90: print("Grade A+ 🎉 You are genius!") elif marks >= 80: print("Grade A – Very good!") elif marks >= 60: print("Grade B – Keep improving!") else: print("Need to study more 💪 Don't worry, you can do it!") |
9. Repeating things – Loops
Print “I will study daily” 5 times without writing 5 lines:
|
0 1 2 3 4 5 6 7 |
for i in range(5): # 0,1,2,3,4 → 5 times print("I will study daily! Day", i+1) |
Output:
|
0 1 2 3 4 5 6 7 8 9 |
I will study daily! Day 1 I will study daily! Day 2 ... I will study daily! Day 5 |
Quick Summary – Your First Mental Map
|
0 1 2 3 4 5 6 7 8 9 10 11 12 |
Programming = Variables (store data) + Input/Output (talk to user) + Math & Operators + Conditions (if/else – decisions) + Loops (repeat) + Functions* (coming next level – reusable recipes) |
Your First Mini Home Task (Do it today!)
- Open any online Python editor (try: replit.com or pythonanywhere.com or google “online python editor”)
- Write a program that:
- Asks user their name
- Asks their birth year
- Calculates age (2026 – birth year)
- Prints “Hello [name], you are [age] years old in 2026!”
Try it — and feel free to paste your code here if you want me to check it or explain any mistake.
Any doubt? Ask anything — “this line not working”, “why we use ==”, “what is string?”, anything!
Ready for level 2 (functions, lists, small project like number guessing game)? Just say “next” 😄
Happy coding! 🚀 Your friendly Hyderabad programming teacher
