Python Forum
Calculate area of a circle
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Calculate area of a circle
#21
yay! putting "things to calculate" in functions is generally a good thing. i can't think of a case not to though over time i might come up with one. but the case where not to define one in the current project is if that project has no need for it unless the project is a module intended to be imported by other code (i've done a few hundred of those).

if i am coding up just one function i usually add code to the same file to handle being run as a command to either run a test on the function or just do output based on command arguments.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How Can I Draw Circle With Turtle İn Python ? mdm 2 2,753 Jun-03-2021, 02:07 PM
Last Post: DPaul
Photo I need help with a circle random color code and error Vxploit 4 3,016 Mar-21-2021, 07:23 PM
Last Post: jefsummers
  Turtle circle Fabio87 3 2,481 Dec-17-2020, 10:52 PM
Last Post: Fabio87
  Intersection of a triangle and a circle Gira 3 3,626 May-19-2019, 06:04 PM
Last Post: heiner55
  function with radius as a parameter that returns area of a circle taydeal20 4 7,184 Feb-07-2018, 03:33 PM
Last Post: buran
  radius of circle question charlottecrosland 5 4,223 Sep-11-2017, 09:50 AM
Last Post: charlottecrosland

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020