====== LU05.L04: Römische Zahlzeichen ====== ===== Blockly ===== {{:modul:m319python:learningunits:lu05:loesungen:lu07_roemisch_loesung.png?600|}} ===== Python ===== numerals = ['M', 'D','C','L','X','V','I'] decimals = [1000, 500, 100, 50, 10, 5, 1] count = 0 result = '' number = int(input('Dezimalzahl > ')) while number > 0: if (number >= decimals[count]): result += numerals[count] number = number - decimals[count] else: count = count + 1 print (result)