Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Write a simple python program to find out on which quadrant does the given point lies in. Assume that the user inputs x-coordinate and

image text in transcribed

2. Write a simple python program to find out on which quadrant does the given point lies in. Assume that the user inputs x-coordinate and y-coordinate values. Based on the user inputs, you need to decide whether the given point lies in 1st, 2nd, 3rd or 4th quadrant. Also, you need to check, if the user input lies along the axis. The diagram has been shown below for illustration: [15 Marks] 1 y-axis (5,2) X-axis You also need to calculate the distance between the origin and the entered point. For this question, you can import math library. Sample Test Data: Please enter the x-coordinate: 5 Please enter the y-coordinate: 2 - Sample Output: The point lies in the l quadrant. The distance between the points (0,0) and (5,2) is 5.38 unit. - Sample Test Data: Please enter the x-coordinate: 0 Please enter the y-coordinate: 2 - Sample Output: The line lies on the y-axis. The distance between the points (0,0) and (0,2) is 2.00 unit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions