ITC558 | Programming Principles Assessment Item 1 | Information Technology

Home Assignment Answers ITC558 | Programming Principles Assessment Item 1 | Information Technology

  • In this Assignment we have to write a program of ‘Shape Area Calculation System’ (SACS).
  • First of all the program prints the welcome message i.e ‘Welcome to Shape Area Calculation’.
  • Prints six menu options
  1. Triangle
  2. Rectangle
  3. Trapezoid
  4. Circle
  5. Ellipse
  6. Parallelogram
  • Prompt the user ‘Please select the shape you would like to calculate the area  for(1-6)’
  • Get the input from user using method ‘raw_input()’ and store into a variable ‘user_input’
  • Prints ‘Thank You!’.
  • If user_input==1(Triangle)
    • Prints ‘The shape you selected is:Triangle’.
    • Prompts the user to enter the base(in centimeters ) and store value into a variable ‘base’.
    • Prompts the user to enter the height (in centimeters) and store value into a variable ‘height’.
    • Calculate the area using the formula ((base*height)/2) and display the result.
  • If user_input==2(Rectangle)
    • Prints ‘The shape you selected is: Rectangle’.
    • Prompts the user to enter the length(in centimeters) and store value into a variable ‘length’.
    • Prompts the user to enter the breadth (in centimeters) and store value into a variable ‘breadth’.
    • Calculate the area using the formula (length *breadth) and display the result.
  • If user_input==3(Trapezoid)
    • Prints ‘The shape you selected is: Trapezoid’.
    • Prompts the user to enter the base1 (in centimeters) and store value into a variable ‘base1’.
    • Prompts the user to enter the base2 (in centimeters) and store value into a variable ‘base2’.
    • Prompts the user to enter the height (in centimeters) and store value into a variable ‘height’.
    • Calculate the area using the formula ((1/2(base1+base2))*height) and display the result.
  • If user_input==4(Circle)
    • Prints ‘The shape you selected is: Circle.
    • Prompts the user to enter the radius (in centimeters) and store value into a variable ‘radius’.
    • Calculate the area using the formula (3.14*radius*radius)and display the result.
  • If user_input==5(Ellipse)
    • Prints ‘The shape you selected is: Ellipse.
    • Prompts the user to enter the length of Semi-Major Axis (in centimeters) and store value into a variable ‘semi_major_axis’.
    • Prompts the user to enter the length of Semi-Minor Axis  (in centimeters) and store value into a variable ‘semi_minor_axis’.
    • Calculate the area using the formula (3.14* semi_major_axis* semi_minor_axis)and display the result.
  • If user_input==6(Parallelogram)
    • Prints ‘The shape you selected is: Parallelogram’.
    • Prompts the user to enter the base(in centimeters) and store value into a variable ‘base’.
    • Prompts the user to enter the height(in centimeters) and store value into a variable ‘height.
    • Calculate the area using the formula (base*height) and display the result.
  • After the completion of the calculation print ‘ Thanks for using Shape Area Calculation System’
  • Then Prints ‘Goodbye’ and exit.

Search Here

Latest Reviews

  • Marcus
    30 Apr, 2019

    My assignment help services are provided in the best way by this website. The writers have completed my assignment in such a way that they helped me increase my overall performance.

  • Emy
    29 Apr, 2019

    Awesome work done by the experts of this company. I visited this site to get math assignment completed. My assignment was complete in every aspect. Thanks to the professionals who provided assignment writing help.

  • Darina
    25 Apr, 2019

    All thanks to the writers of Assignment Help 4 Me who completed my Physics assignment in the right manner. The structure of the assignment was totally customized according to my needs and that too at cheap prices.

View All Reviews

Facebook

Assignment Help 4 Me