Multi-page HTML Content

Published on
Embed video
Share video
Ask about this video

Scene 1 (0s)

[Audio] <div class="absolute top-20 left-14 text-yellow-300 text-4xl for i in range(1, 10): For Loops — Bollywood Fun Lab! for star in stars: Welcome, super coders! Get ready to learn for loops with your Bollywood heroes! Shahrukh Aamir Salman Amitabh Aishwarya Abhishek John Sri Devi Rajnikanth print("Bollywood!") We will see code, pictures, and outputs side-by-side. Click to see code animate from left → right..

Scene 2 (30s)

[Audio] Index — Your Learning Map Navigate through your Python for loop adventure! Theory Basic Counting — range(n) What are for loops and how they work With Shahrukh Khan & Friends Slides 3–6 Slides 7–11 Start to End — range(start, end) Steps — range(start, end, step) With Abhishek Bachchan & Friends With Rajnikanth & Friends Slides 12–16 Slides 17–21 Lists Strings With John Abraham & Friends With Sri Devi & Friends Slides 22–26 Slides 27–31 Nested Loops With Salman Khan & Friends Slides 32–36 Recap + Super Challenge Show what you've learned with all our Bollywood stars! Slide 37 Tip: Each main example is followed by 4–5 fun exercises.

Scene 3 (1m 29s)

[Audio] Theory 1 — What is a for loop? Simple idea: A for loop repeats steps for each number or each item. We use it to count, list names, letters, or make patterns. Mini-demo (concept only): Result: 1 2 3 for i in range(1, 4): print(i) Remember: It is like saying, "Do this for every value.".

Scene 4 (1m 57s)

[Audio] Theory 2 — Why use for loops? They save time. No need to write the same line many times. They reduce mistakes. The loop handles the counting. They work with lists and words easily. We can also add simple if checks inside a loop. Without loop (long way): With loop (smart way): print("Hello Guest 1") for i in range(1, 101): print("Hello Guest 2") print("Hello Guest", i) print("Hello Guest 3") # Just 2 lines for 100 guests! # Imagine 100 guests! Remember: If you need to repeat something many times, a for loop is your best friend!.

Scene 5 (2m 46s)

[Audio] Theory 3 — Types of for loops Numbers with range(n) Numbers with range(start, end) for i in range(5): # 0,1,2,3,4 for i in range(2, 6): # 2,3,4,5 Numbers with range(start, end, step) Over lists (items) for i in range(0, 10, 2): # 0,2,4,6,8 for fruit in fruits: # apple, banana... Nested loops (loop inside loop) Over strings (letters) for row in range(3): for char in "PYTHON": # P,Y,T,H,O,N for col in range(3): Optional later: using index helpers (like enumerate) — we will keep it simple first..

Scene 6 (3m 43s)

[Audio] Theory 4 — Syntax guide (quick) range(n) → 0 to n-1 range(a, b) → a to b-1 for i in range(5): for i in range(2, 6): print(i) print(i) Output: 0, 1, 2, 3, 4 Output: 2, 3, 4, 5 range(a, b, s) → a, a+s, a+2s... Lists/Strings → for x in items/word: for i in range(1, 10, 2): for name in ["Amir", "Salman"]: print(i) print(name) Output: 1, 3, 5, 7, 9 Output: Amir, Salman Nested → for r in range(...): for c in range(...): for r in range(2): for c in range(3): print(r, c) Makes a grid: (0,0), (0,1), (0,2), (1,0), (1,1), (1,2) Tip: Keep names short and clear, like i, num, item..

Scene 7 (4m 57s)

[Audio] Cat 1 — Main: Shahrukh counts scripts (1 to 5) Basic Counting Scenario: Shahrukh checks 5 movie scripts on his desk. for i in range(1, 6): Script 1 print("Script", i) Script 2 Script 3 Script 4 Script 5 Explanation: The loop prints each page number. Try This!: Change the end to 6 → 1..5 stays same; to 7 → 1..6..

Scene 8 (5m 34s)

[Audio] Cat 1 — Ex: Aamir counts awards (1 to 4) Basic Counting Scenario: Aamir counts his shiny awards 1 to 4. for i in range(1, 5): Award 1 print("Award", i) Award 2 Award 3 Award 4 Explanation: The loop prints each award number from 1 to 4. Try This!: Count to 6 by changing range(1, 5) to range(1, 7)..

Scene 9 (6m 8s)

[Audio] Cat 1 — Ex: Salman counts gym reps (1 to 6) Scenario: Salman does 6 push-ups and counts them. for i in range(1, 7): Rep 1 print("Rep", i) Rep 2 Rep 3 Rep 4 Rep 5 Rep 6 Explanation: The loop counts each repetition from 1 to 6. Try This!: Change to 8 reps..

Scene 10 (6m 42s)

[Audio] Cat 1 — Ex: Amitabh counts books (1 to 5) Scenario: Amitabh counts books on a shelf. for i in range(1, 6): Book 1 print("Book", i) Book 2 Book 3 Book 4 Book 5 Explanation: The loop prints each book number in order. Try This!: Start from 2 instead..

Scene 11 (7m 14s)

[Audio] Cat 1 — Ex: Aishwarya counts accessories (1 to 5) Scenario: Aishwarya counts 5 pretty items. Item 1 print("Item", i) Item 2 Item 3 Item 4 Item 5 Explanation: The loop counts through each fashion item number. Try This!: Make it 7 items..

Scene 12 (7m 40s)

[Audio] Cat 2 — Main: Abhishek counts years (2010 to 2020) Range Start-End Scenario: Abhishek points at a timeline from 2010 to 2020. for year in range(2010, 2021): print(year) Explanation: The loop prints each year from 2010 through 2020. Notice we use 2021 as the end value to include 2020. Try This!: Start at 2015 to show only recent years..

Scene 13 (8m 13s)

[Audio] Cat 2 — Ex: Aishwarya fashion years (2015 to 2020) Scenario: Aishwarya counts show years. for year in range(2015, 2021): Year 2015 print("Year", year) Year 2016 Year 2017 Year 2018 Year 2019 Year 2020 Explanation: The loop prints each fashion show year from 2015 to 2020. Try This!: End at 2019 by changing the end value to 2020..

Scene 14 (8m 59s)

[Audio] Cat 2 — Ex: Sri Devi counts dance steps (1 to 6) Scenario: Sri Devi counts dance steps in order. for step in range(1, 7): Step 1 print("Step", step) Step 2 Step 3 Step 4 Step 5 Step 6 Explanation: The loop prints each dance step number in sequence. Try This!: Start at 2 by changing the range to range(2, 7)..

Scene 15 (9m 33s)

[Audio] Cat 2 — Ex: Rajnikanth counts posters (2 to 7) Scenario: Rajnikanth checks posters from 2 to 7. for num in range(2, 8): Poster 2 print("Poster", num) Poster 3 Poster 4 Poster 5 Poster 6 Poster 7 Explanation: The loop counts from 2 to 7 (range end 8 is not included). Try This!: Make it 2 to 9 by changing range(2, 8) to range(2, 10)..

Scene 16 (10m 9s)

[Audio] Cat 2 — Ex: Shahrukh seat numbers (21 to 25) Scenario: Shahrukh checks seats in a row. for seat in range(21, 26): Seat 21 print("Seat", seat) Seat 22 Seat 23 Seat 24 Seat 25 Explanation: The loop goes through seat numbers 21 to 25. Try This!: Start at 20 to include one more seat..

Scene 17 (10m 45s)

[Audio] Cat 3 — Main: Rajnikanth superhero jumps (2,4,6,8,10) Steps (range with step) Scenario: Rajnikanth makes jumps in twos. for num in range(2, 11, 2): print(num) Explanation: The loop prints numbers from 2 to 10, stepping by 2 each time. Try This!: Change step to 3 to get 2, 5, 8 instead..

Scene 18 (11m 15s)

[Audio] Cat 3 — Ex: Aamir climbs stairs (5,10,15,20,25) Range with Steps Scenario: Aamir climbs stairs in steps of 5. for num in range(5, 26, 5): print(num) Explanation: The loop counts up in steps of 5. Try This!: Go to 30..

Scene 19 (11m 38s)

[Audio] Cat 3 — Ex: John odd hero steps (1,3,5,7,9) Range with Steps Scenario: John counts odd moves. for num in range(1, 10, 2): Explanation: The loop prints odd numbers by stepping 2 at a time. Try This!: Start at 3..

Scene 20 (12m 5s)

[Audio] Cat 3 — Ex: Shahrukh cricket scores (10,20,30,40,50) Scenario: Shahrukh counts scores by 10. for score in range(10, 51, 10): print(score) Explanation: The loop counts scores by steps of 10, from 10 up to 50. Try This!: Change the end to 61 to go up to 60..

Scene 21 (12m 33s)

[Audio] Cat 3 — Ex: Abhishek countdown (10,8,6,4,2) Scenario: Abhishek counts down in twos. for num in range(10, 1, -2): print(num) Explanation: The loop counts down from 10 to 2, skipping every other number with step -2. Try This!: Start at 12..

Scene 22 (12m 57s)

[Audio] Cat 4 — Main: John prints movie list List Iteration Scenario: John reads movie titles one by one. movies = ["Dhoom", "Force", "Pathaan"] Dhoom for title in movies: Force print(title) Pathaan Explanation: The loop goes through each movie title in the list and prints it. Try This!: Add one more title to the list..

Scene 23 (13m 22s)

[Audio] Cat 4 — Ex: Abhishek lists car brands Scenario: Abhishek shows car brands. cars = ["BMW", "Audi", "Mercedes"] BMW for brand in cars: Audi print(brand) Mercedes Explanation: The loop goes through each brand in the cars list and prints it. Try This!: Add Tesla to the list..

Scene 24 (13m 46s)

[Audio] Cat 4 — Ex: Salman lists pet names Scenario: Salman names his pets. pets = ["Bruno", "Miu", "Mithu"] Bruno for name in pets: Miu print(name) Mithu Explanation: The loop visits each name in the pets list and prints it. Try This!: Add one more pet name to the list..

Scene 25 (14m 12s)

[Audio] Cat 4 — Ex: Amitabh reads poetry books Iterating Lists Scenario: Amitabh reads book titles from his poetry collection. books = ["Poems 1", "Poems 2", "Poems 3"] Poems 1 for b in books: Poems 2 print(b) Poems 3 Explanation: The loop goes through each book title in the list and prints it. Try This!: Reorder the list to change which poem appears first..

Scene 26 (14m 43s)

[Audio] Cat 4 — Ex: Aishwarya lists accessories Scenario: Aishwarya checks items to buy. items = ["Bag", "Shoes", "Jewelry"] Bag for item in items: Shoes print(item) Jewelry Explanation: The loop goes through each item in Aishwarya's shopping list and prints it. Try This!: Add "Scarf" to the list and see what happens..

Scene 27 (15m 12s)

[Audio] Cat 5 — Main: Sri Devi spells her name String Iteration Scenario: Sri Devi prints each letter of her name one by one. for ch in "SRIDEVI": S print(ch) R I D E V I Explanation: The loop visits each character in the string and prints it. Try This!: Use your own name instead of "SRIDEVI"..

Scene 28 (15m 39s)

[Audio] Cat 5 — Ex: Amitabh spells PYTHON Scenario: Amitabh points at letters. for ch in "PYTHON": P Y T H O N Explanation: The loop visits each character in the string and prints it. Try This!: Spell SCHOOL..