-2

is there a way to make a code to calculate the exp(3.8) without using any import whether it's math or any other imports.

I wanna try making a program that calculates the exp of any number without using imports but I can't figure it out so does anyone have any proposition on where I should start or an example of a code.

kkhater
  • 82
  • 8
  • 3
    Why not use imports? And you could just look up the algorithm to compute what you want, then write that code yourself. – Carcigenicate Dec 20 '19 at 17:48

2 Answers2

3

Yes, remember e is just a number!

e = 2.718281828459045
e ** 3.8
>> 44.70118449330081
BenedictWilkins
  • 1,173
  • 8
  • 25
  • If you are interested in computing it to an arbitrary number of dp then [this](https://www.nde-ed.org/EducationResources/Math/Math-e.php) is a place to start. – BenedictWilkins Dec 20 '19 at 17:51
-1

The operator "**" is used to exponential.

Example bellow:

>>> 4**2
>>> 16