Send your feedback or ask for help here!
I’m trying to figure out how to use the formula in the description but it seems for me that me or the description has missing something.
The formula from description is
tan(θ) = v² / (r * g). Also the statement says that bike will stall when angle
< 30. So I tried to express the v from the formula above:
v=sqrt(tan(θ) * r * g).
And now I’m looking at the Duel test to make sure my formula is correct, as it’s the simplest (there is only one curve with radius
If I use my formula to calculate the maximum constant speed, I get
v = sqrt(tan(30) * 60 * 9.81) ≈ 18
But the test expects it to be
31. I’m not that good in physics and probably that ‘constant maximum speed’ is a tricky thing that I should have understood in different way, or maybe I’m also not that good in math so my formula just isn’t correct.
Could someone please point me where to look?
As said in the statement:
θ = angle with respect to the vertical (degrees)
A motorcycle will stall if the angle to the ground is < 30 degrees.
Oh, that’s what I was missing. Thank you a lot!
Hi everyone !
Learning Python since a few days, I still learning the syntax. Codin game is here for me to improve my skill.
And here, I’m blocked.
Below my python’s code for calculate the optimal speed:
Method which gives our optimum speed
def OptimumSpeed(listRadius = ):
minRadius = min(listRadius)
v = sqrt(atan(60) * (minRadius * 9.81))
For the case “Real case”, expected is 29, my code gives 28.
For all the others cases, it works, but not here, and I don’t understand why.
Did you see something wrong ?
I’m pretty sure you actually mean
tan here (instead of
atan) and it expects an argument in radians.
Not related, but using mutable objects as default parameter (
listRadius = ) can be dangerous.
Oh yeaaaaaaaaaaaah Niako. Green, green, green. You were so right !
I put atan instead of tan !
And true, I set parameter in degree rather than radians.
Will take a look on your advice.
Thanks a lot
I’ve a strange behaviour with my code. When I test, I pass 1,4,5 & fail 2,3 but with the validators after submission I pass 2,3,4,5 & fail 1 !!!
I don’t really see what could be wrong ??
thanks by now
I’d suggest passing first all IDE tests before worrying about the validators.