ScratchData LogoScratchData
Back to popswilson's profile

Two Points and a Line

POpopswilson•Created January 14, 2022
Two Points and a Line
5
1
32 views
View on Scratch

Instructions

Click on the Green Flag. The project selects two points random on the plane and then draws the straight line connecting the two points.

Description

One of my grandsons wants to learn to program. He opened a Scratch account. I then posed the problem of picking two points at random on the plane and drawing the straight line between the points. We sat down together and worked through the code in the project. This project saves the coordinates of the two points and then uses a [go to (x) (y) ] block to go to the first point and then another [goto (x) (y )] block to draw the line to the second point. This method does not use the equation of a straight line, y=mx+b. He has taken Algebra 1 and is now in Algebra 2. I asked him if he remembered y = mx + b and he said that he remembered that m is the slope of the line and b the y-intercept. I then challenged him to use y=mx+b to code the problem using the mathematics he learned but does not know how to apply. I will post his reply to my challenge at a later date.

Project Details

Project ID628670689
CreatedJanuary 14, 2022
Last ModifiedJanuary 16, 2022
SharedJanuary 16, 2022
Visibilityvisible
CommentsAllowed