A simple measurement conversion utility.

The unica was one-twelfth of a Roman foot. In 1324 the legal definition of the inch was set out in a statute of Edward II of England, defining it as "three grains of barley, dry and round, placed end to end, lengthwise". At various times the inch has also been defined as the combined lengths of 12 poppyseeds. Since 1959 the inch has been defined officially as 2.54cm.

Write a program that converts feet to inches and inches to feet. The user should be prompted to enter the conversion they require.

Use this boilerplate code as a starting point:

Remember to add a comment before a subprogram, selection or iteration statement to explain its purpose.

- Takes a parameter, 'feet' and returns inches calculated as feet multipled by twelve.

- Takes a parameter, 'inches' and returns feet calculated as inches divided by twelve.

- Prompts the user to enter their choice of 1. converting feet to inches, 2. inches to feet or 3. to quit.
- The user should be continually prompted until they make a valid input 1, 2 or 3.

- Presents the menu to the user.
- If the user chooses option 1 it asks the user to enter the number of feet as a decimal number and outputs the number of inches.
- If the user chooses option 2 it asks the user to enter the number of inches and outputs the number of feet.
- If the user chooses option 3 it outputs, "Goodbye"

- It calls the `converter` subprogram.

1. Feet to inches

2. Inches to feet

3. Quit

Enter choice: 1

Enter the number of feet: 3

3.0 feet is 36.0 inches.

1. Feet to inches

2. Inches to feet

3. Quit

Enter choice: 2

Enter the number of inches: 72

72.0 inches is 6.0 feet.

1. Feet to inches

2. Inches to feet

3. Quit

Enter choice: 3

Goodbye

Use these resources as a reference to help you meet the success criteria.

Run the unit tests below to check that your program has met the success criteria.

1. Feet to inches

2. Inches to feet

3. Quit

Enter choice: 1

Enter the number of feet: 2

2.0 feet is 24.0 inches.

1. Feet to inches

2. Inches to feet

3. Quit

Enter choice: 1

Enter the number of feet: 4.5

4.5 feet is 54.0 inches.

1. Feet to inches

2. Inches to feet

3. Quit

Enter choice: 2

Enter the number of inches: 26

26.0 inches is 2.1666666666666665 feet.

1. Feet to inches

2. Inches to feet

3. Quit

Enter choice: 2

Enter the number of inches: 36

36.0 inches is 3.0 feet.

1. Feet to inches

2. Inches to feet

3. Quit

Enter choice: 3

Goodbye

Check that you have:

- Used comments within the code to describe the purpose of subprograms, conditions and iterations.
- Used meaningful identifier names. That means the names of subprograms and variables indicate what they are for.