I am having a little trouble with this question: "Write a program using a for loop that calculates exponentials. Your program should ask the user for a base base and an exponent exp, and calculate base**exp."
This is what I came up with:
x = (raw_input ("Enter a base:"))
y = (raw_input ("Enter an exponent:"))
exponential = pow(x, y)
for solution in exponential:
print "answer =", solution
When I run it, an error comes up for line 3 with this message:
TypeError: unsupported operand type(s) for ** or pow(): 'str' and 'str'

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

Looking for something else?

Not the answer you are looking for? Search for more explanations.

## More answers

Looking for something else?

Not the answer you are looking for? Search for more explanations.