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,910 points
1,434 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,300 points

Related Questions In Python

0 votes
4 answers

What is a Tuple in Python and how to use it?

Tuples  are a  Unchanging sequence of values, ...READ MORE

answered Jun 21, 2020 in Python by sahil
• 500 points
1,963 views
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,020 points
1,537 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, 2020 in Python by Niroj
• 82,840 points
15,838 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
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,300 points
921 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,300 points
6,227 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP