PR to Update instructions.append.md for Triangle

The current version of instructions.append.md for the Rust Triangle exercise gives an inaccurate definition of a right triangle:

an isosceles triangle whose equal sides are separated by 90 degrees

(a right triangle need not be isosceles)

I attempted to fix this while trying not to add too much additional text that’s incidental to the exercise (I opened a matching PR); and also tried to clarify a little the phrasing about the representation of irrationals, at the end of the same paragraph.

Original text:

However, some triangles cannot be represented by pure integers. A simple example is a right triangle (an isosceles triangle whose equal sides are separated by 90 degrees) whose equal sides both have length of 1. Its hypotenuse is the square root of 2, which is an irrational number: no simple multiplication can represent this number as an integer

Text in the PR:

However, some triangles cannot be represented by pure integers. A simple example is an isosceles right triangle (a right triangle is a triangle whose smaller sides form an angle of 90 degrees) whose equal sides both have length of 1. Its hypotenuse is the square root of 2, which is an irrational number: no integer type can represent this number.

Hopefully the changes are readable/make sense :-)

The right triangle part is a bit distracting. Can the second sentence just be “A simple example is an isosceles triangle where two of the three sides are both the length of 1 .” We’re introducing angles suddenly into a discussion of sides.

Well, the angle has to be 90 degrees in this example, otherwise the hypotenuse is not the square root of two. I don’t think we need to be precise and formal here, we should get the point across with simple language.

A simple example is a triangle with a 90 degree angle between two equal sides of length 1. Its third side has the length square root of 2, which is an irrational number. No integer can represent it.

1 Like

+1 - this is short, simple, and keeps the focus on the exercise itself - much better than my initial proposal, thank you!

I’ve committed your change to my local branch, though the PR hasn’t been updated (I’m guessing because it’s closed).

Alternatively, I can file a different PR, which would leave out the noise of my initial commit - whichever you prefer.

No need - we squash PRs anyway. I’ve reopened and will take another look a little later & probably merge. Thanks for taking the time!

Can we move the last bit into brackets pls:

to…

A simple example is a triangle with a 90 degree angle between two equal sides of length 1. Its third side has the length square root of 2, which is an irrational number (meaning it cannot be written as an integer or a fraction)

sure, that sounds good

Oooops sorry I think we got into a race condition - I opened a PR to implement iHiD’s suggestion and only then saw you had done that too moments earlier - please ignore mine and sorry about the noise!

lol, guess I forgot to call mutex.lock()