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
hichkok12 [17]
2 years ago
12

Write a program that prompts the user to enter a point (x, y) and checks whether the point is within the rectangle centered at (

0, 0) with width 10 and height 5.  For example, (2, 2) is inside the rectangle and (6, 4) is outside the rectangle.

Computers and Technology
1 answer:
Serga [27]2 years ago
5 0

Answer:

## http://pastebin.com/nQWtHb3B

#use above link for formatted program #Python3

c=[float(cord) for cord in input('Enter a point with 2 coordinate :').split(' ')]

base=[0,0]

w=10

h=5

if((abs(c[0]-base[0])<= float(w)/2) and (abs(c[1]-base[1])<= float(h)/2)):

print('Point (',c[0],', ',c[1],') is in the rectange')

else:

print('Point (',c[0],', ',c[1],') is not in the rectange')

You might be interested in
If one department chair—a professor—can chair only one department, and one department can have only one department chair. The en
vodka [1.7K]

Answer:

1:1

Explanation:

According to my research on different types of relationships between two variables, I can say that based on the information provided within the question the entities PROFESSOR and DEPARTMENT exhibit a 1:1 relationship. In other words there can only be one Professor per Department and vice-versa.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
2 years ago
write a C program that declares an integer variable called "favorite_number". The program should then prompt the user to enter t
Arturiano [62]

Answer:

// here is code in C.

// headers

#include <stdio.h>

// main function

int main(void) {

// variable declaration

int favorite_number;

 // ask user to enter favorite number

printf("enter your favorite number : ");

 // read the number

scanf("%d",&favorite_number);

 // print the message

printf("your favorite number is: %d",favorite_number);

return 0;

}

Explanation:

Declare a variable "favorite_number" of integer type.Ask user to enter favorite number and assign it to favorite_number.Then print the message which include the favorite number.

Output:

enter your favorite number : 77

your favorite number is: 77

4 0
3 years ago
Write an application that prompts a user for a month, day, and year. Display a message that specifies whether the entered date i
gizmo_the_mogwai [7]

Answer:

Following is given the code with all necessary description given as comments in it. I hope it will help you!

Explanation:

4 0
3 years ago
How many times is the coin tossed?
valina [46]

Answer:

100 times.

Explanation:

The code will loop until i is equal to or greater than roles. I starts at zero and increases by one after each toss.

3 0
2 years ago
Read 2 more answers
in which situation, a unicast session or a multicast session, can feedback received from an rtcp packet about the session be han
nikklg [1K]

The Real-time Transport Protocol is a network protocol that enables the Voice Over Internet Protocol by delivering streaming audio and video content over the internet (VoIP).

The datagram-oriented protocol is UDP. It is thus because none of the overhead associated with creating, maintaining, and closing connections exists. A network's ability to send audio and video depends on the RTP internet protocol. Designed for reliable live data delivery, the Real-time Transport Protocol (RTP) is a network standard for sending audio or video data. It is utilized in voice over IP, video telephony, and internet telephony. In the OSI model, RTP belongs to both the Presentation Layer (Layer 6) and the Session Layer (Layer 5).

Learn more about protocol here-

brainly.com/question/27581708

#SPJ4

3 0
11 months ago
Other questions:
  • Which of the following translates packets so that the node can understand them once they enter through a port?
    8·2 answers
  • Positive and negative impacts of chemical industries
    6·2 answers
  • What is industry 4.0 -automation revolution-, what is your opinion about the direction this revolution is taking the industry in
    8·1 answer
  • Which system tool allows you to manage the available space on your hard disk to improve efficiency? A. ScanDisk B. Anti-Virus C.
    10·1 answer
  • How to write a function that counts the letters in a string in C?
    13·1 answer
  • ________________is a distribution of Linux Operating<br>system for desktop computers.<br>​
    15·1 answer
  • PLEASEEEEEE HELP, ILL DO ANYTHING JUST ANSWER THESE CORRECTLY!!!!!TYSM!!!
    15·2 answers
  • Where is the BIOS stored?<br><br> CPU<br> CMOS<br> RAM<br> Northbridge
    13·2 answers
  • 3. In 1989, the first handheld console was released by _____ and it was called ________.
    13·1 answer
  • Which of the following is used to store data in the computer's memory that can be
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!