CSE 131 Module 4: Input & Output

Exercises

These exercises are part of the asynchronous component of this course. Material is taught and demonstrated, but at times you are asked to complete one of the exercises to help you master the new concepts.

In the repository you are using for this course, look inside the exercises source folder, and you will see assignments organized by name. Before continuing on to the next portion of the asynchronous material, spend some time on the exercise. When you are finished, commit your code so that credit for the exercise can be given.

It is not so important that you get the exercise exactly right. It is important to work through it as best you can before you look at the solution or continue with other work in this module.


Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Computing statistics for a list of numbers

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!

Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Example using graphics

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!

Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Mouse and keyboard

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!

Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Follow the mouse

In this exercise you will apply what you have learned about graphics to cause a ball to follow the mouse on a graphics screen.

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!

Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Frequency of a pitch

As described in the videos and text, a musical pitch can be encoded as an integer. The convention for this course is that 0 corresponds to concert A, 1 corresponds to Bb just above concert A, and so on.

In this exercise you will print out the frequency associated with a pitch, and with the pitch 7 chromatic steps above that pitch.

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!

Before starting this exercise:
Be sure to update your repository before beginning this assignment, so that you receive any code you need.

Ratios of two pitches' frequencies

Continue your work on the above exercise as follows.

Instructions

After completing this exercise:
Commit and push any files you have changed so that you receive credit for your work!