Exercises: Variables and Iteration
Exercise 1:
- In the docs directory, create a variable called files listing all of the text files.
- Loop through this list and print out the first line from each file.
Exercise 2:
- Use a for loop to create five directories called calculation_?, where ? is a number.
- Use a loop to create five directories, each one the parent of the next.
Next activity: Assessments - Loops Quiz.