-5

I have an issue after using an the exponent function. it keeps throwing syntax errors on the line underneath. I am wondering if I am using "math.exp()" properly.

as an example set of code

case = 1
Dref = [1,2,3,4]

i = 2
j = 1
t = 1
m = 1
Temp = 320

import math
D[case] = (Dref[case]*((50/ t)^ m )) * ( math.exp((20/6)*((1/295) - (1/Temp))):

print (D[case])

The code is for a numerical model and so I will need to use exp on a formula full of variables.

any help would be appreciated!

1 Answers1

0

D[case] = (Dref[case]*((50/ t)^ m )) * ( math.exp((20/6)*((1/295) - (1/Temp)))

It seems to be extra parentheses

Try

D[case] = (Dref[case]*((50/ t)^ m )) * math.exp((20/6)*((1/295) - (1/Temp)))

JerryB
  • 164
  • 7
  • thanks. definitely was the issue. here I was thinking there was some issue with import, when really it was just perentheses. Thanks for looking at it. – Luke Thompson Oct 16 '17 at 21:44