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
anyanavicka [17]
3 years ago
13

Ask the user for five-coordinate pairs. Store each pair as a tuple, and store all the pairs in a list. Print the slope between a

djacent coordinate pairs. So, if you end up with a list of coordinate pairs like this:
[(1, 2), (2, 3), (-3, 3), (0, 0), (2, 6)]
… then your program should print the following slopes:

Slope between (1, 2) and (2, 3): 1.0
Slope between (2, 3) and (-3, 3): 0.0
Slope between (-3, 3) and (0, 0): -1.0
Slope between (0, 0) and (2, 6): 3.0
You’ll need to pack the two values you retrieve from the user into a tuple.

As you go through your pairs of tuples, you can also unpack the variables in them into x1, y1, x2, and y2. That way, computing the slope is as simple as:

slope = (y2 - y1) / (x2 - x1)
Computers and Technology
1 answer:
Margaret [11]3 years ago
8 0

Answer:

y=(1/2) x+3

Explanation:

You might be interested in
If the fluid level in a battery is below the separators<br> should be added but never add
geniusboy [140]
Never add tap water to your battery. ... Battery electrolyte levels should be just below the bottom of the vent well, about ½ - ¾ inch above the tops of the separators. Never let the electrolyte level to drop below the top of the plates.
7 0
3 years ago
Your computer is crashing on a regular basis. Which of the following is an operation available to the user that should help rese
Neko [114]

Answer

System restore

Explanation

System restore is a recovery feature that helps restore your system to the previous condition or point. Most computers have system restore disks which are an advantage to the users especially when the computer clashes.These disks are very effective when it comes to restoring the system to its initial state.

6 0
3 years ago
Read 2 more answers
Unwanted emails are called:malware,phishing, spam or virus
Colt1911 [192]
1. Spam
2. Phishing
3. True
3 0
3 years ago
A telecom company wants to extend their horizontal cables over a distance of 510 meters. Which cable should they use?
Volgvan
They should use fiber cable because it is faster and more reliable
8 0
4 years ago
Which would be the most efficient way to store files on your computer?
lorasvet [3.4K]

Answer:

Best way to store all your files is a external storage device, like a hard drive or a usb stick, copy all your files to the device and keep it in a safe place.

3 0
3 years ago
Other questions:
  • The analog signals that carry analog or digital data comprise composites built from combinations of simple sine waves.
    12·1 answer
  • You use a(n) ____ variation when a use case is less specific than others, and you want to be able to substitute the more specifi
    8·1 answer
  • Which of the following statements is false?
    12·1 answer
  • How does an employer judge a candidate?<br> The employer judge's the candidate's ? for a job.
    12·1 answer
  • Which term refers to a type of an attack in which an attacker makes his data look like it is coming from a different source addr
    10·1 answer
  • Write a calculator program that keeps track of a subtotal like real calculators do. Start by asking the user for an initial numb
    12·1 answer
  • Which of the following methods for learning to use new software includes tips for using the product, updates to download, and in
    7·2 answers
  • Which os the following is NOT true about the proof of work concept?
    8·1 answer
  • Witch icon allows you to see paragraph formatting feature
    6·1 answer
  • 5. Why do we need programming language?​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!