Write a Python function that reads on the keyboard as input an integer (int) n greater than or equal to 10 and finds the solution r of the following equation: r2 – n + 10 = 0 The function displays the message “The solution is r” , where r is replaced by the value of r which is the solution of the equation. The type of r is real (float). At the end, the function returns the value of the variable r. This function therefore makes a display and a return.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter5: Control Structures Ii (repetition)
Section: Chapter Questions
Problem 14PE
icon
Related questions
Question
Write a Python function that reads on the keyboard as input an integer (int) n greater than or equal to 10 and finds the solution r of the following equation: r2 – n + 10 = 0 The function displays the message “The solution is r” , where r is replaced by the value of r which is the solution of the equation. The type of r is real (float). At the end, the function returns the value of the variable r. This function therefore makes a display and a return.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning