1.

Write the program toin python To find the area of the circle

Answer» Area of a circle can simply be evaluated using following formula.<pre>Area = pi * r2where r is radius of circle </pre>Python3<i id="copy-code-button" title="Copy Code">filter_none</i><i id="run-and-edit-button" lang="python3" title="Edit Code">edit</i><i id="run-code-button" lang="python3" title="Run Code and See Output">play_arrow</i><i title="Dark Mode">brightness_4</i>\t<code># Python program to find Area of a circle </code><code>\xa0</code>\xa0<code>def</code> <code>findArea(r): </code><code> </code><code>PI </code><code>=</code> <code>3.142</code><code> </code><code>return</code> <code>PI </code><code>*</code> <code>(r</code><code>*</code><code>r); </code><code>\xa0</code>\xa0<code># Driver method </code><code>print</code><code>(</code><code>"Area is %.6f"</code> <code>%</code> <code>findArea(</code><code>5</code><code>)); </code>\t


Discussion

No Comment Found