Skip main navigation

New offer! Get 30% off your first 2 months of Unlimited Monthly. Start your subscription for just £35.99 £24.99. New subscribers only T&Cs apply

Find out more

Welcome to Week 3

Welcome week 3
<v ->Welcome to week three.</v> So this week you’re going to work with loops and lists. You’re going to be able to predict the output of code with loops and lists. Also use the range function when you’re looping through things. You’ll be able to use a for-each loop to traverse a string or a list, a for loop that has a range, or a while loop. You’ll also compare two adjacent values as you’re looping through a list. Also show you how to use list comprehensions as a way to make your code even shorter and filter data. And then I also want you to know how to justify which type of loop you should use when you’re working on a problem.
And then for our assignment, you’re gonna create ASCII art. So hope you have a great time this week, enjoy.

. . . . . . . . . . . . . . . . . .

This video introduces the topic of loops. Loops allow you to iterate through a statement or block of statements a certain amount of times with a for-each loop, general for loop, or a while loop.

This article is from the free online

Big Ideas in Programming: Expressing Yourself with Python

Created by
FutureLearn - Learning For Life

Reach your personal and professional goals

Unlock access to hundreds of expert online courses and degrees from top universities and educators to gain accredited qualifications and professional CV-building certificates.

Join over 18 million learners to launch, switch or build upon your career, all at your own pace, across a wide range of topic areas.

Start Learning now