## Sunday, August 3, 2014

### Programming Roman Numerals using Pro-Bot

The aim of this programming assignment is to use Procedures in Pro-Bot to draw Roman Numerals.
Roman numerals, the numeric system used in ancient Rome, employs combinations of letters from the Latin alphabet to signify values. Numbers are formed by combining symbols and adding the values. There is no zero in this system. Roman Numerals, as used today, are based on seven symbols:

Symbols are placed from left to right in order of value, starting with the largest. To write the Roman numeral, each of the non-zero digits should be treated separately. However, in a few specific cases, to avoid four characters being repeated in succession (such as IIII or XXXX), subtractive notation is used as follows (Wikipedia):
• the numeral I can be placed before V and X to make 4 units (IV) and 9 units (IX)
• X can be placed before L and C to make 40 (XL) and 90 (XC)
• C can be placed before D and M to make 400 (CD) and 900 (CM) according to the same pattern
Examples:
1. The numbers 1 to 10 expressed in Roman numerals are: I, II, III, IV, V, VI, VII, VIII, IX, X.
2. The number 2014 expressed in Roman numerals is MMXIV (2000 = MM, 14 = XIV).
3. The number 1954 can be expressed using the subtractive notation: 1000 = M, 900 = CM, 50 = L and 4 = IV. Therefore, 1954 is MCMLIV.

### Programming Assignment:

Write programs for Pro-Bot to draw the symbols in the Roman Numeral system, according to the dimensions given.
Write a program to draw each symbol. Test your programs on Pro-Bot to see if you get the desired shapes. Store the program for each symbol as a separate procedure in Pro-Bot’s memory.
Next, draw the Roman Numeral representation for different numbers using Pro-Bot. Make calls to the procedures from your Pro-Bot program to draw the various components in the Roman Numeral representation.
Note: Pro-Bot does not have the option of lifting and lowering the pen via programming instructions. Hence, after drawing each symbol, it is necessary to physically lift the unit and place it on the starting spot for the next symbol to successfully draw a multi digit number.
This assignment could also work as a group project, where each student writes the procedures for 2-3 symbols each. The students can then take turns calling the procedures for the symbols in a multi-digit number.

Computer Science concepts involved:  Sequential programming, Procedures
Math Concepts involved:  Roman Numerals, Place value, Measurement, Angles
Hours required:  2 or more

### Lesson Plan:

Hours 1& 2:
Introduce the Roman Numerals and their values. Write programs for Pro-Bot to draw each of the symbols according to the dimensions given below. Save each program as a Procedure on Pro-Bot.

All dimensions are in centimeters. The angular measurements are in degrees.

Hour 3:
Find the Roman Numeral representation of multi-digit numbers of your choice. Call the procedures in Pro-Bot that you previously wrote to draw each symbol in the number.

Example:
Write programs to draw the Roman Numeral representation of the following numbers using Pro-Bot.
1. 123
2. 49
3. 490
4. 1056