Computers and Technology, 17.12.2020 17:40 sweetbri7p5v6tn
You will create a program that will take in the values for two points (x1 , x2) and (y1, y2) to find the slope of a line that contains those two points.
I have provided the pseudocode for you below. All you need to do is translate the pseudocode to a Python program that will run and output the correct slope.
You can test your program by entering the following two point values: (x1 , y1) β> (32, 22) and (x2 , y2) β> (53, 36). Your slope should be 2/3.
PROCEDURE getCoordinates ()
{
<< global variables predefined in starter code >>
DISPLAY (What is the value of x1?)
x1 β INPUT()
DISPLAY (What is the value of y1?)
y1 β INPUT()
DISPLAY (What is the value of x2?)
x2 β INPUT()
DISPLAY (What is the value of y2?)
y2 β INPUT()
}
PROCEDURE getSlope()
{
<< global variables predefined in starter code >>
numerator β y2 - y1
denominator β x2 - x1
getHighestMultiple()
numerator β numerator / highestMultiple
denominator β denominator / highestMultiple
DISPLAY(βSlope is β + numerator + β/β + denominator)
}
PROCEDURE getHighestMultiple()
{
<< global variables predefined in starter code >>
temp β numerator
while (temp > 1)
{
IF((numerator MOD temp == 0) and (denominator MOD temp == 0))
{
highestMultiple β temp
}
temp β temp - 1
}
}
getCoordinates();
getSlope();
Answers: 2
Computers and Technology, 22.06.2019 19:10
What a backup plan that you have created in a event you encounter a situation
Answers: 2
Computers and Technology, 23.06.2019 02:30
Which component acts as a platform on which application software runs
Answers: 2
Computers and Technology, 23.06.2019 12:00
If you're using an existing powerpoint presentation that will receive new slides based on a word outline, select the a. slide that will appear after the new slides. b. first slide in the presentation. c. slide that will appear before the new slides. d. last slide in the presentation.
Answers: 2
Computers and Technology, 23.06.2019 21:30
Enzoβs balance sheet for the month of july is shown. enzoβs balance sheet (july 2013) assets liabilities cash $600 credit card $4,000 investments $500 student loan $2,500 house $120,000 mortgage $80,000 car $6,000 car loan $2,000 total $127,100 total $88,500 which expression finds enzoβs net worth?
Answers: 1
You will create a program that will take in the values for two points (x1 , x2) and (y1, y2) to find...
Chemistry, 23.11.2020 06:30
Chemistry, 23.11.2020 06:30
Chemistry, 23.11.2020 06:30
Mathematics, 23.11.2020 06:30
English, 23.11.2020 06:30
Mathematics, 23.11.2020 06:30
Mathematics, 23.11.2020 06:30
Mathematics, 23.11.2020 06:30
Physics, 23.11.2020 06:30
Arts, 23.11.2020 06:30
Biology, 23.11.2020 06:30
Mathematics, 23.11.2020 06:30