Write a function named isvalidReal() that checks for a valid double-precision nu
ID: 3633045 • Letter: W
Question
Write a function named isvalidReal() that checks for a valid double-precision number. This kind of number can have an optional + or - sign, at most one decimal point (which can be the first character), and at least one digit between 0 and 9. The function should return a Boolean value of true if the entered number is a real number; otherwise, it should return a Boolean value of false.Examples:
Enter a real number: -23.45
The real number you entered was: -23.45
Enter a real number: qw56
The number you entered is invalid.