check2.txt Edit this file and then submit it to Autolab. Be sure to watch the videos very carefully, and not just skip ahead to the parts required to answer these questions! Be *very brief* in your answers! Seriously. Brief. --------------------------------------------------------------------- 1. Your full name and andrew id: 2. The full names and andrew id's of your groupmates (if you worked collaboratively). 3. Dates/times that you watched the videos listed in check2.html (fill this out as you go): 4. Total time this check required (fill this out when you are done): 5. "for loops" video: 5.1. Briefly explain the meaning of each value m, n, and k in the expression range(m, n, k). 5.2. What was so "terrible" about the last solution to sumOfOddsFromMToN? 5.3. Run the last example of sumOfOddsFromMToN in the course notes, using the "Run" button in the course notes, so you are running it in Brython (in the browser). Then, edit the code so that the third value in the range expression is the integer 0 instead of the integer 2. Run it. It will crash. Copy-paste the error message here. (Aside: is this what you expected?) 5.4. Repeat the previous problem, only here replace the third value with 0.1 instead of the integer 2. Again, it will crash. Copy-paste the error message here. (Aside: is this what you expected?) 6. "nested for loops" video: 6.1. In the first example in this section, why do we use end="" in the inner print statement, but not in the outer print statement? 6.2. What is the mystery star shape? 6.3. Modify the code for the mystery star shape so that it prints the same shape, only upside down (so the last row becomes the first row, and so on). Include your code here. 7. "while loops" video: 7.1. When in general would you prefer a "while" loop to a "for" loop? 7.2. Why do we need to use a while loop in the leftmostDigit example? 7.3. What is the bug in the buggySumToN example? 8. "break and continue" video: 8.1. What precisely does a break statement do? 8.2. What precisely does a continue statement do? 9. "isPrime" video: 9.1. What would go wrong if we omitted the if statement at the start of isPrime? 9.2. What is it that makes fasterIsPrime so much faster than isPrime? (Hint: it's not the bit about evens and odds (that helps, but not nearly so much as something else.)) 9.3. Run the timing code (the last code in this section) using Brython in the browser. How long does isPrime(499) take? fasterIsPrime(499)? 9.4. Repeat 9.3, only this time running the same code in Pyzo or Sublime. Now how long do they take? These numbers are very different from your answer to 9.3. Very briefly, explain why. 10. "nthPrime" video: 10.1. In addition to its parameter n, nthPrime uses two local variables -- found and guess. What precisely do each of these values mean here? 10.2. Why does nthPrime use a while loop instead of a for loop? That's it! Carpe diem!