Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 3 Lnai 9286

Authors: Albert Bifet ,Michael May ,Bianca Zadrozny ,Ricard Gavalda ,Dino Pedreschi ,Francesco Bonchi ,Jaime Cardoso ,Myra Spiliopoulou

1st Edition

3319234609, 978-3319234601

More Books

Students also viewed these Databases questions

Question

What are the objectives of Human resource planning ?

Answered: 1 week ago

Question

Explain the process of Human Resource Planning.

Answered: 1 week ago