Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Code: Personal Space A user will input their name, location, and radius of their personal space. A second user will do the same. You

Python Code: Personal Space

A user will input their name, location, and radius of their personal space. A second user will do the same. You will analyze this information and determine the results of two tests.

Person Test: This test determines if an individual has someone in their own personal space. One of the following outputs is possible:

  • Person One is in Person Two's personal space
  • Person Two is in Person One's personal space
  • Person One and Person Two are in each other's personal space
  • Neither Person One nor Person Two is in the other's personal space

Space Test: This test determines the relation of the personal spaces of each person. One the following outputs is possible:

  • Person One and Person Two's personal spaces overlap
  • Person One and Person Two's personal spaces do not overlap
  • Person One's personal space is entirely inside Person Two's personal space
  • Person Two's personal space is entirely inside Person One's personal space

NOTE: The messages you print out should look very similar to these. That means the user's name should actually be printed where Person One or Person Two is shown above.

Example

Welcome to the Social Situation Analyzer System Person One Enter your name: Alice Enter your position (x, y): 50, -70 Enter your personal space radius: 30 Person Two Enter your name: Bob Enter your position (x, y): 30, -50 Enter your personal space radius: 20 Social Situation Analysis Results Person Test: Bob is in Alice's personal space Space Test: Alice and Bob's personal spaces overlap

Code Requirements

  • You may have only one print statement after the second user enters their info
  • You may assume the user will give proper input
  • You may assume that the people cannot stand in the exact same location (distance between them cannot be zero)
  • You must use a logical operator to determine if the users are both in each other's space

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

Students also viewed these Databases questions

Question

3. Identify cultural universals in nonverbal communication.

Answered: 1 week ago

Question

2. Discuss the types of messages that are communicated nonverbally.

Answered: 1 week ago