How to use Euler's number and power operation?

0 votes
How to write x.append(1-e^(-value1^2/2*value2^2)) in python 2.7?
Dec 31, 2018 in Python by ana1504.k
• 7,510 points
28 views

1 answer to this question.

0 votes
You can refer the math library of python. exp(x) function. This library is same as e^x. Hence you can rewrite your code as:

import math
x.append(1 - math.exp( -0.5 * (value1*value2)**2))
answered Dec 31, 2018 by SDeb
• 12,440 points

Related Questions In Python

0 votes
3 answers
0 votes
1 answer

How to install and use myql connector in Python?

You can use pip to search if ...READ MORE

answered Jul 5 in Python by Neel
• 1,670 points
14 views
+2 votes
2 answers

How to use BeatifulSoup for webscraping?

your programme is fine until you start ...READ MORE

answered Apr 4, 2018 in Python by charlie_brown
• 7,710 points
23 views
0 votes
1 answer

how to download and install Django rest framework?

To install Django, you can simply open ...READ MORE

answered Apr 24, 2018 in Python by Christine
• 15,790 points
107 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 134 views
0 votes
1 answer

How to use a global variable in function?

The global variable can be used in ...READ MORE

answered Sep 27, 2018 in Python by SDeb
• 12,440 points
17 views
0 votes
1 answer

How to use multiprocessing queue in Python?

This is a simple example of a ...READ MORE

answered Oct 25, 2018 in Python by SDeb
• 12,440 points
184 views