Hello guys, today’s daily challenge is again from me.
Today’s one will be too easy when you know what to do.
We will (again) travel a bit to the past, but today, we are going to go to old Greece. Imagine you’re in this time, when Democracy is invented and the old men of science discovered the earliest formulas, that are still used today, in this device that you are certainly staring at.
one of the main issues was, to invent a formula for a triangle’s surface. This was really needed because of farmers dividing their land to their sons who wanted the same each or to calculate another thing. (Idk what else actually, I had no more ideas.)
So actually, today’s challenge will be, to make a procedure that, if three sides of a triangle are given (and nothing else), returns the surface.
Tip: You will have to know Heron.
Heron-joke
PS: If you don’t know Heron, then
You were the one and only one, who skipped school for koding apps while Math lessons were ongoing
Your teacher was the fake Einstein, who saw “Heron” at the blackboard as the topic for today and thought “Hmmmm. Never heard of him. And immediately began an English conjugation lesson with the conjugation topic “He won” as the conjugation topic (in the upcoming math test, you would be wrong because in a question about Heron, instead on Heron,(which was not discussed in your Heron lesson, but a “He won” lesson on the place of Heron.) you would write “He won” bc you don’t know who Heron is)
However, both situations are excusable. So, if you were in one of those situations (or both), you will have to check who’s Heron first.
I do not get it. The surface of a triangle is calculated as (base x height) divided by 2, forget the heron formula
So in this example b is height since its right triangle then assuming b=5 and a = 4 then the surface is (4x5)/2=10 and with code is approximately 10 (9.92157) . So why does your procedure returns 6 as surface area ?
See mine
I didn’t forget basic maths I just misread the numbers instead of 3,4,5 I saw 4,5,6 And yes in Greece we still have lockdown. From Monday some shops and public services will start again
My district has been placed in Green Zone so it is expected that we will get some concession in Lockdown since Monday.
I hope same for you and everyone.
Btw , I would like to say thank you to @Yoshi for this easy but tricky daily challenge.
Is it expected to see more daily challenges on math?