For this assignment, you will design and implement each of the Problems listed in each file. You can find Problem 1 in main.py and Problem 2 in variables.py.

Download, extract, and open

Download the starter code for our first homework assignment. Then, extract (unzip) the contents anywhere on your computer. From VSCode, navigate to File | Open and select the homework0 folder.

Info

For this assignment, we are not grading on linter errors, but you should practice good style and address all linter errors as shown by flake8.

Problem 1

Step through the following code and determine what the final value is for both first and second. Replace XXX in main.py with the final values for first and second.

first = 8
second = 9
first = first + second
second = first - second
first  = first - second

Problem 2

The following instructions are also included in variables.py for your convenience. Place your answer on the next line below the corresponding instruction.

  1. Assign the value 160 into a variable.
  2. Multiply the value in the variable by 2 and then store it back into the same variable.
  3. Print out the variable.