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
An _____ is a set of directions for carrying out a task.
Lena [83]

An algorithm is a set of directions for carrying out a task. Sounds about right

8 0
4 years ago
Why wont it let me get another free trial on adobe photoshop?
k0ka [10]
A free trial is a one-time thing. Try using another email address or something. 
3 0
3 years ago
Which component of cpu controls the overall operation of computer..​
arsen [322]

Answer:

Control Unit.

Explanation:

The component of CPU that controls the overall operation of computer is control unit.

The control unit, also known as CU, is one of the main component of the Central Processing Unit (CPU). The function of CU is to fetch and instruct computer's logic unit, memory, input and output device. The CU receives information which it turns into signals. Thus controlling the overall operations of computer.

Therefore, control unit is the correct answer.

4 0
3 years ago
What are the major features of React?
marysya [2.9K]

<em>JSX - JavaScript Syntax Extension. JSX is a syntax extension to JavaScript. </em>

<em>Virtual DOM. React keeps a lightweight representation of the “real” DOM in the memory, and that is known as the “virtual” DOM (VDOM)</em>

<em>Performance. ...</em>

<em>Extensions. ...</em>

<em>One-way Data Binding. ...</em>

<em>Debugging. ..</em><em>.</em>

<em>Components. ...</em>

<em>State.</em>

3 0
3 years ago
Hi guy how do i make money in app cuz im desperate for 1 right now​
Margarita [4]

Answer:

we need context

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • A logical bus topology: is
    6·1 answer
  • Tool such as microsoft’s ____ are helping to bridge different platforms and programming languages.
    6·1 answer
  • Why might location be important when searching for a job?
    10·2 answers
  • i see tabs named mowed and Ramsey i tried shredding them and deleting them and ending all the processes but they start duplicati
    13·1 answer
  • Stuck on where to go with this one.
    15·1 answer
  • Instructions:Select the correct answer.
    9·2 answers
  • Date Class Constructor – assigns fields to appropriate formal parameter – using the setters so error checking will occur. The co
    6·1 answer
  • The process of converting an input file (stream of characters) into an understandable format is called syntax analysis.
    7·1 answer
  • A type of user interface that features on- screen objects, such a menus and icons, manipulated by a mouse.
    7·1 answer
  • Which of the following statements is true for plotly?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!