Quiz 04 Euler number

If x  = 5, what is the mass of the sun? escalated.jpg

That same reaction was what I had when I got in charge of doing Quiz 04. This time we had to make the sum of 1 divided by n! factorial. This until it reaches the euler number = 2.71 and it stops looping around.

quiz04.png

I broke my head constantly for several days trying to reach the answer for this equation in python3 language. This was until Ken Bauer miraculously helped me out and teached me what means each step means. I am not trying to pass the course by copy pasting codes. It is just that I have to see what is happening in a code first and then analyse it. This is in order to learn what to do and use it for future references. For instance, from the previous WSQ09 i learned to do factorials, so that was a piece of cake in this quiz. This is the code:

quiz04code

And this is how it runs:

quiz04run

When n! is 18 and n! is 19, the answer it is the same. That moment it is when it stops.

I am going to introduce another David Bowie’s song over here just for one reason, maybe a slowpoke one since I just realized it. This one is called Lazarus. It was released in his most recent album Blackstar in 2016. This song got his video release 3 days before he passed away in January 10th 2016. It is a really sad song. Was he saying goodbye? Who knows, but it gives this song even a bigger meaning. May he rest in peace.

lazarus.png

 

 

CC BY-SA 4.0 Quiz 04 Euler number by rhcpalmarichie is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.