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

    Join Date
    Oct 2012
    Posts
    1
    Rep Power
    0

    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 Expert (3500 - 3999 posts)

    Join Date
    Oct 2003
    Posts
    3,692
    Rep Power
    1958
    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 Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,931
    Rep Power
    481
    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