Validating Roman Numerals - HackerRank - #14 - Python Practice Examples

Veröffentlicht am: 10 May 2020
auf dem Kanal: Interview Coder
2,029
14

This Challange is to test the logic of Validating Roman Numerals in HackerRank.

Join :
  / jagwithyou  
  / jagwithyou  
https://github.com/jagwithyou


Hint:
You are given a string, and you have to validate whether it's a valid Roman numeral. If it is valid, print True. Otherwise, print False. Try to create a regular expression for a valid Roman numeral.

Input Format

A single line of input containing a string of Roman characters.

Output Format

Output a single line containing True or False according to the instructions above.

Constraints

The number will be between and (both included).

Sample Input

CDXXI
Sample Output

True
References

Regular expressions are a key concept in any programming language. A quick explanation with Python examples is available here. You could also go through the link below to read more about regular expressions in Python.

https://developers.google.com/edu/pyt...


#CompetitiveProgramming #TWP


Auf dieser Seite können Sie das Online-Video Validating Roman Numerals - HackerRank - #14 - Python Practice Examples mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Interview Coder 10 May 2020 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 2,029 Mal angesehen und es wurde von 14 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!