At Westonci.ca, we make it easy for you to get the answers you need from a community of knowledgeable individuals. Our Q&A platform offers a seamless experience for finding reliable answers from experts in various disciplines. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

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 adjacent 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)


Ask The User For Fivecoordinate Pairs Store Each Pair As A Tuple And Store All The Pairs In A List Print The Slope Between Adjacent Coordinate Pairs So If You E class=

Sagot :

Answer:  

Python code print("**** Please enter 5 coordiante pairs ****") lst1 = [] # initialise two empy lists lst2 = [] for i in range(5) : # 5 iterations to ...

Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. Get the answers you need at Westonci.ca. Stay informed with our latest expert advice.