<p>您的代码有错误</p>
<ol>
<li>使用raw\u input()获取字符串输入,而不是input()</li>
<li>使用int(raw_input())接受整数输入,这不是一个错误,但这是一个很好的实践。你知道吗</li>
<li>你试图用字符串除int。你知道吗</li>
<li>您试图连接字符串和整数。你知道吗</li>
</ol>
<p>你的代码应该是这样的。你知道吗</p>
<pre><code>import math
print('Select a number.')
y = int(raw_input())
print('Select another number.')
x = int(raw_input())
print('Select what operation you wish to perform. (e for exponentiation, d for division, m for multiplication, a for addition, s for subtraction, mo for modulo, l for log (the base is the first number you entered), r for root)')
z = raw_input()
if z == 'e' or z == 'E':
print('The answer is %d' %(y**x))
elif z == 'd' or z == 'D':
print('The answer is %d' %(y/x))
elif z == 'm' or z == 'M':
print('The answer is %d' %(y*x))
elif z == 'a' or z == 'A':
print('The answer is %d' %(y+x))
elif z == 's' or z == 'S':
print('The answer is %d' %(y-x))
elif z == 'mo' or z == 'Mo':
print('The answer is %d' %(y%x))
elif z == 'l' or z == 'L':
print('The answer is %d' %(math.log(x,y)))
elif z == 'r' or z == 'R':
print('The answer is %d' %(y**(1/x)))
</code></pre>