Floating Point Euro

This is a function to check if a string represents a floating point number in European format. This format uses a comma in place of a decimal point. This type of float is formatted integer, comma, integer, where the second integer cannot be negative. Implement this function with a try-except statement. Can not use conditionals.Returns True if s is a float in European format. Returns False otherwise.
In European format, a comma is used in place of a decimal point. So ‘12,5’ stands for 12.5, ‘0,12’ stands for 0.12 and so. Formally, a string is in European format if it is of the form , where d1 and d2 are ints (and d2 >= 0).Examples:
iseurofloat(‘12,5’) returns True
iseurofloat(‘-12,5′) returns True
iseurofloat(’12’) returns False
iseurofloat(’12,-5′) returns False
iseurofloat(‘,5’) returns False
iseurofloat(‘apple’) returns False
iseurofloat(‘12,5.3’) returns False
iseurofloat(‘12,5,3’) returns False
iseurofloat(‘1e-2’) returns False

New Download