Link to Replit (fork it to duplicate)

Example

for i in range(1, 11):
  print(i)
  if i == 5:
    print("i equals 5")

Summary

In this video, the speaker demonstrates how to create loops in Python, similar to those in Scratch. They show how to use the ‘for’ keyword to create a simple loop that prints numbers from 1 to 10. The video also covers using conditional statements within loops, such as checking if a variable equals 5. The speaker highlights the flexibility of variable names in loops and the usefulness of this basic loop structure in Python programming. Overall, the video provides a clear and practical introduction to loops in Python, emphasizing their importance in coding.