1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Mars2501 [29]
3 years ago
13

Write a program to ask for a Cartesian coordinate x,y. Your program should read in an x value and a y value and then inform the

user whether it is the origin (0,0), on the y axis, eg (0, 10), on the x axis, eg (-3,0) or in which quadrant it appears.
Computers and Technology
1 answer:
AnnZ [28]3 years ago
6 0

Answer:

The program in Python is as follows:

x = int(input("x: "))

y = int(input("y: "))

if x == 0:

   if y == 0:        print("Origin")

   else:        print("y axis")

elif x>0:

   if y > 0:        print("First Quadrant")

   elif y < 0:        print("Fourth Quadrant")

   else:        print("x axis")

elif x < 0:

   if y > 0:        print("Second Quadrant")

   elif y < 0:        print("Third Quadrant")

   else:        print("x axis")

Explanation:

These get input for x and y

<em>x = int(input("x: "))</em>

<em>y = int(input("y: "))</em>

If x is 0

if x == 0:

<em>............ and y is 0, then the point is at origin</em>

   if y == 0:        print("Origin")

<em>............ and y is not 0, then the point is on y-axis</em>

   else:        print("y axis")

If x is greater than 0

elif x>0:

<em>............ and y is greater than 0, then the point is at in the first quadrant</em>

   if y > 0:        print("First Quadrant")

<em>............ and y is less than 0, then the point is at in the fourth quadrant</em>

   elif y < 0:        print("Fourth Quadrant")

<em>............ Otherwise, the point is on the x axis</em>

   else:        print("x axis")

If x is less than 0

elif x < 0:

<em>............ and y is greater than 0, then the point is at in the second quadrant</em>

   if y > 0:        print("Second Quadrant")

<em>............ and y is less than 0, then the point is at in the third quadrant</em>

   elif y < 0:        print("Third Quadrant")

<em>............ Otherwise, the point is on the x axis</em>

   else:        print("x axis")

You might be interested in
George wants to pursue a career in web technology as a web developer. Which certifications can help him as a web developer?
skelet666 [1.2K]

Answer:Google Analytics IQ.

he can use this

Explanation:

3 0
3 years ago
Which one of the following features can control left and right indents on using markers
QveST [7]
The Feature that can control left and right indents on using markers is Ruler.  The indent marker consists of two triangles and a rectangle.  <span>To change the left indent, click on the very bottom of the indent marker, the rectangle, and drag it to a new position.</span>  <span>The Right Indent is indicated by a single triangle on the Ruler at the current right margin. Click and drag it to change the margin.</span>
3 0
3 years ago
Which of the following statements about renting and owning
laila [671]
Renting means you sign a contract or a lease to live their owning means you bought the house and pay mortgage <span />
5 0
4 years ago
Dashed lines that display on your slide when you are moving an object and that assist you with alignment are referred to as:
Umnica [9.8K]
Smart guides is the answer.
7 0
3 years ago
Read 2 more answers
Any computer or device on a network that can be addressed on the local network is referred to as a:
Umnica [9.8K]
<span>Any computer or device on a network that can be addressed on the local network is referred to as a: node.</span>
5 0
3 years ago
Other questions:
  • A drivers touches a cars steering wheel on a hot day which term refers to the way heat is transferredd to the drivers hand
    6·2 answers
  • Once you select select a crop boundary, you can no
    15·1 answer
  • ________ gives its approval to U.S. e-commerce websites that follow strict privacy standards, such as explaining to visitors how
    6·1 answer
  • Declare a prototype for a function called isPrime that returns true or false and expects a single parameter named number of type
    14·1 answer
  • Relation between training and occupation with examples in points . Plz tell fast<br> ​
    5·1 answer
  • Anyone wanna play Smash Ultimate. I'm a Link main (that doesn't mean I camp, thats young link) who plays competitve with legal s
    8·1 answer
  • Site at least 3 articles of impact of internet that affect in our daily lives.
    15·1 answer
  • Kos-huar-utb garls jonly​
    8·2 answers
  • Why would a user want to resend a message? Check all that apply.
    7·2 answers
  • missy just hired a software development team to create an educational simulation app for a high school course. she has specific
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!