# SD212 HW 22

## [name] Type your name on the next line


## [Q1]

> Look at the code in `shakes.py`. Maybe try running it on the command
> line by typing for example `python3 shakes.py 15`.
>
> Describe briefly what this program does.


## [Q2]

> The bash script you downloaded `run-shakes.sh` just runs the Python
>
> program with ten different numbers. Time the execution by running on
> the command line:
>
>     time bash run-shakes.sh
>
> You will see three timing numbers reported. The first ("real") is
> the actual elapsed "real" time, and the second ("user") is the
> amount of CPU time that was used. Answer this question by reporting
> these two numbers.


## [Q3]

> Now modify `run-shakes.sh` so that it runs the Python programs
>
> concurrently by *backgrounding* them. You need to make two changes:
>
> i)  Add a `&` at the end of each line so that the python3 programs
>     run in the background, like this:
>
>         python3 shakes.py 16 &
>
> ii) Add a new line at the end with the single command `wait`
>
> After making these changes, time the execution again:
>
>     time bash run-shakes.sh
>
> and report the real and user time numbers.


## [Q4]

> Besides the timing, what is different about the output from the
>
> "parallel"/backgrounded version compared to the original version?


