@extends('template') @section('title') Lab 7: Part 2. Nested Loop Warm up @stop @section('head') @stop @section('content') # Lab 7: Part 2. Nested For Loop Warm Up ## Worksheet Links Worksheet: [click here for worksheet (flip to backside)](https://docs.google.com/document/d/1P40ZZ5Fe0kPIypb2uMFM83t6gK9xTZmpsQQODE9lvHU/edit) {{-- [Solutions](https://docs.google.com/document/d/1mOV2Jc9r--bwEJxZDFdDZ7edWlWT7tVlD8d9FB5lDT0/view) --}} ## A. Warm up exercises Write what each snippet of code produces: 1. ```py for x in [1, 4, 10]: for y in [7, 8]: print (x + y) ``` 2. ```py for let in 'pie': for num in [2, 5, 0]: print (let * num) print('hi') ``` 3. ```py for num1 in range(1,4): for num2 in range(1,num1+1): print ('O' * num1 + 'H' * num2) ``` @include('/labs/lab07/_toc') @stop