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, 24.06.2019 15:30, pineapplefun
During the software planning process, rick, a project manager, finds that his team has made an incorrect estimation of funds. what kind of risk has rick identified? rick has identified a risk.
Answers: 1
Computers and Technology, 24.06.2019 19:30, sipstick971
Dtp allows you to manipulate text boxes in the following ways. more than 1 answer. a. move them b. rotate them c. resize them d. all of the above e. none of the above
Answers: 1
You will create a program that will take in the values for two points (x1 , x2) and (y1, y2) to find...
Mathematics, 01.09.2021 22:00
Mathematics, 01.09.2021 22:00
Chemistry, 01.09.2021 22:00
Mathematics, 01.09.2021 22:00
English, 01.09.2021 22:00
Mathematics, 01.09.2021 22:00