Experiment with the Python interpreter and explain why you are seeing the results you do:

  1. We’ve seen that n = 42 is legal. What about 42 = n?

  2. How about x = y = 1?

  3. In some languages every statement ends with a semi-colon ;. What happens if you put a semi-colon at the end of a Python statement?

  4. What if you put a period at the end of a statement?

  5. In math notation you can multiply x and y like this: xy. What happens if you try that in Python?

Use the Python interpreter as a calculator to answer the following:

  1. The volume of a sphere with radius r is 4/3 times pi times the cube of the radius. What is the volume of a sphere with radius 5?

  2. Suppose the cover price of a book is $24.95, but bookstores get a 40% discount. Shipping costs $3 for the first copy and 75 cents for each additional copy. What is the total wholesale cost for 60 copies?

  3. If I leave my house at 6:52 am and run 1 mile at an easy pace (8:15 per mile), then 3 miles at tempo (7:12 per mile) and 1 mile at easy pace again, what time do I get home for breakfast?

Turn it in

Post a message with your answers to the last three questions to the Canvas discussion board for Lab Two. See if your answers agree with the answers other people are posting. If not, ask for help from your classmates in the discussion board.