[Tutor] Roman Numeral - To - Digital Converter
Alan Gilfoy
agilfoy at frontiernet.net
Mon Mar 12 02:44:28 CET 2007
Roman Numeral - To - Digital Converter
So far, I'm coming along OK with the code that runs the conversions,
assuming the user gives me a proper input. (A string of capital
letters I, V, X, L, C, D, M)
However, not every input someone gives the function is goign to be
properly formatted like that.
So:
1. How do I have my function "screen" an input string for characters
that aren't I,V,X,L,C,D or M?
2. If any of the characters in the string are merely lowercase
i,v,x,l,c,d, or m, how would I tell Python to capitalize those and go
on with working the function?
--
"Blind faith in bad leadership is not patriotism."
"One of the most horrible features of war is that all the war-propaganda, all
the screaming and lies and hatred, comes invariably from people who are not
fighting."-George Orwell, _Homage to Catalonia
More information about the Tutor
mailing list