2+5-3+6ユーザーにや returnなどの文字列を入力させたい10。ユーザーが入力するcと、回答が出力されます。ユーザーが a を入力したときにプロジェクトを中断する方法がわかりませんc。
print 'This is a calculator. Please follow the instruction.'
temp = 0
string = 0
def asmd(string):
print 'Your answer is', eval(str(string))
while temp != 'c':
print 'Please enter a number or operation. Enter c to complete. :'
temp = raw_input()
string = str(string)+str(temp)
if temp == str('c'):
asmd(string)