Py Warmup 1

  1. A list of the first 1000 integers.

  2. A list of the first 1000 perfect squares.

  3. The sum of the first 100 perfect cubes.

  4. A list of all of the perfect cubes between 1000 and 20000.

  5. The product of the numbers in the previous list, computed using a for loop.

  6. Compute sin(pi/12).

  7. Find the greatest common divisor of 1558853167347433739 and 10062552685783700385249011.

  8. The last 20 characters of the string "A dolphin likes the water. A snake slithers in the sand."

  9. What is the difference between 5**3, 5^3, and math.pow(5,3)? Ask about 5^3 if it is hard to understand.

  10. Print this part of a poem:

    i carry your heart with me(i carry it in
    my heart)i am never without it(anywhere
    i go you go,my dear;and whatever is done
    by only me is your doing,my darling)
                                                          i fear
    

Alternative

USACO milkmix problem: 2018 December Bronze 1.

Last modified August 28, 2023: Python introduction content days 1-4. (75c2bfd)