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,890 points
129 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
• 13,250 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, 2019 in Python by Neel
• 3,010 points
160 views
0 votes
1 answer

How does numpy.newaxis work and when to use it?

Hello, The np.newaxis is generally used with slicing. It indicates ...READ MORE

answered Apr 14 in Python by Niroj
• 23,950 points
307 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, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 962 views
0 votes
0 answers
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
• 13,250 points
82 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
• 13,250 points
1,584 views