Ask Question
27 January, 21:39

Given that a function name f receives three parameters a, b, c, of type double, write some code, to be included as part of the function, that determines whether the value of "b squared" - 4ac is negative. If negative, the code prints out the message "no real solutions" and returns from the function.

+5
Answers (1)
  1. 28 January, 00:04
    0
    def calculatereality (a, b, c):

    if (pow (float (b),2) - 4*float (a) * float (c)) >=0:

    print ("real solutions")

    else:

    print ("no real solutions")

    calculatereality (12,234,12) #This is for output check

    Explanation:

    The function required is written above. It prints imaginary or real values according to the calculations b^2-4*a*c.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Given that a function name f receives three parameters a, b, c, of type double, write some code, to be included as part of the function, ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers