1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Rep Power

    Help writing geometry calculator with python

    I'm completely new and unfamiliar with programming, but I need to write a python program with modules that displays a menu:
    Geometry Calculator
    1. Area of a circle
    2. Area of a rectangle
    3. Area of a triangle
    4. Exit program
    if 1 (area of circle) is selected, the program should ask for the radius of the circle & then calculate the area (using the formula area = pi*r^2) and display the result, same for the other options but for their respective shapes, and end the program if the number 4 is entered.
  2. #2
  3. Lord of the Dance
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Oct 2003
    Rep Power
    Please read the sticky post.

    You have any code?
    Please be more specific about what you need help and start with the basic first, e.g. learn how to get user input.
  4. #3
  5. Contributing User
    Devshed God 1st Plane (5500 - 5999 posts)

    Join Date
    Aug 2011
    Rep Power
    The triangle is a little interesting, there being so many ways to represent a triangle.

    I quibble with your circle area formula.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo