Question: Write a python program that displays the menu program as shown below. Option 1: Sum of two numbers Option 2: Area of a triangle Option

Write a python program that displays the menu program as shown below. Option

1: Sum of two numbers Option

2: Area of a triangle Option

3: Square root of a number

Accept an option from the user as an integer type. Based on the user input option, perform the following operations. For each option number, perform the respective tasks.

Option Tasks

1. Accept two integer numbers and add them and display the sum.

2. Accept the base and height of a triangle as float types and compute the area of the triangle using the formula Area = * base * height. Display the area in a floating point with two digits after the decimal point.

3. Import the math module and accept an integer number from the user and print the square root of the input number. The output should be in integer datatype.

4. Exit from the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!