Question: Python Part I: Arabic NumeralsWolfie Numerals Converter (20 points) You've heard of Roman numerals, but have you beard of Wolfe numerals? Probably mot because we've

 Python Part I: Arabic NumeralsWolfie Numerals Converter (20 points) You've heard
of Roman numerals, but have you beard of Wolfe numerals? Probably motPython

Part I: Arabic NumeralsWolfie Numerals Converter (20 points) You've heard of Roman numerals, but have you beard of Wolfe numerals? Probably mot because we've invented them for this lab assignment. Wolfie numerals are similar to Roman numerals in that numbers are formed by combining symbols and adding the values. In Wolfie numerals, each numeral has a fixed value representing a power of 8 (rather than a power of 10 or half of a power of 10, as in Roman numcrals) Symbol: alue: In addition, there are also symbols representing the halved powers of . A complete list of Woltic numerals is given belkow: Value: 48 64 Symbols are placed from left to right in onder of value, starting with the largest For example, EFII is 14 (8 x 1)(4 x 1)+(1 x 2)-8+4+2-14 Note: You may want to review (or leam) the rules foe the Roman numcrals to beticr understand this assignment. In a few specific cases, to avoid having three or more characters being repeated in succession (such as Ill or EEE subtractive notation is used, meaning that a smaller number is listed before the bigger value, as in this table Number: 3(4-1)7 (8-1) 24 (32-8)56(64-8) Notation: IF IE ES For example, with these subtractive notations, insicad of writing 7 as 4+1+1+1(FTTT), you must write it as 8-1IEAo shorten the numeral sequence Thas, there must never be more than two instances of a single symbol next to each other in a Wolfie numeral. Also, only the numerals that are powers of 8 can be repeated. Moreover, it is disallowed for a symbol to be userd in an additive manner after it has been used in a suhtractive manner. To see why this is true, consider Roman CSE 101-Fall 2017 Lab#9 Page 1 numerals for a momen, CXC (I90) is valid becaase C is used tirst in an additive way and then in a suberactive way. But XCXX is invalid hecause X is fint used in a suhtractive way and then in an additive way. In Wolfie numerals, examples of analogous invalid cases would be expressions like IPII, E7E and ESEE Based on the rules described ahove, an updated tahle of the mamerals can he descrihed as helow Value: 13 4 78 24 32 56 64 Max of Appearances: Write a function arabi cao:ie() that takes one argument, su which is an Arabic numeral that you will need to conmvert to the Wolie numerals. Your function should return the Woltie mumeral as a string. Note: You will only be given num in the range , 63]1 (inclusive of both). Bekow are some examples to help you understand. Keep in mind that you want the sequence to he as shoet as possible while following the numeral rules. Example #1: num 10 Look from the larger Wolie numerals to the smalker numerals. What is finst value you can suberact? 's 8. Now you have 2 left to worry about, and the only applicable value is 1. Since I can appear twice, we have two I's Therefore,IC 8 + 1 + 1, and this translates to Eli. Example#2: num- 14 Part I: Arabic NumeralsWolfie Numerals Converter (20 points) You've heard of Roman numerals, but have you beard of Wolfe numerals? Probably mot because we've invented them for this lab assignment. Wolfie numerals are similar to Roman numerals in that numbers are formed by combining symbols and adding the values. In Wolfie numerals, each numeral has a fixed value representing a power of 8 (rather than a power of 10 or half of a power of 10, as in Roman numcrals) Symbol: alue: In addition, there are also symbols representing the halved powers of . A complete list of Woltic numerals is given belkow: Value: 48 64 Symbols are placed from left to right in onder of value, starting with the largest For example, EFII is 14 (8 x 1)(4 x 1)+(1 x 2)-8+4+2-14 Note: You may want to review (or leam) the rules foe the Roman numcrals to beticr understand this assignment. In a few specific cases, to avoid having three or more characters being repeated in succession (such as Ill or EEE subtractive notation is used, meaning that a smaller number is listed before the bigger value, as in this table Number: 3(4-1)7 (8-1) 24 (32-8)56(64-8) Notation: IF IE ES For example, with these subtractive notations, insicad of writing 7 as 4+1+1+1(FTTT), you must write it as 8-1IEAo shorten the numeral sequence Thas, there must never be more than two instances of a single symbol next to each other in a Wolfie numeral. Also, only the numerals that are powers of 8 can be repeated. Moreover, it is disallowed for a symbol to be userd in an additive manner after it has been used in a suhtractive manner. To see why this is true, consider Roman CSE 101-Fall 2017 Lab#9 Page 1 numerals for a momen, CXC (I90) is valid becaase C is used tirst in an additive way and then in a suberactive way. But XCXX is invalid hecause X is fint used in a suhtractive way and then in an additive way. In Wolfie numerals, examples of analogous invalid cases would be expressions like IPII, E7E and ESEE Based on the rules described ahove, an updated tahle of the mamerals can he descrihed as helow Value: 13 4 78 24 32 56 64 Max of Appearances: Write a function arabi cao:ie() that takes one argument, su which is an Arabic numeral that you will need to conmvert to the Wolie numerals. Your function should return the Woltie mumeral as a string. Note: You will only be given num in the range , 63]1 (inclusive of both). Bekow are some examples to help you understand. Keep in mind that you want the sequence to he as shoet as possible while following the numeral rules. Example #1: num 10 Look from the larger Wolie numerals to the smalker numerals. What is finst value you can suberact? 's 8. Now you have 2 left to worry about, and the only applicable value is 1. Since I can appear twice, we have two I's Therefore,IC 8 + 1 + 1, and this translates to Eli. Example#2: num- 14

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!