This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #coding:utf-8 | |
| from __future__ import division #整数割り算時の切り捨て解除 | |
| #演算子と文字列(出力用)のリスト | |
| funcs=[lambda x,y:x+y,lambda x,y:x-y,lambda x,y:y-x,lambda x,y:x*y,lambda x,y:x/y,lambda x,y:y/x] | |
| sikifuncs=[lambda x,y:"("+x+"+"+y+")",lambda x,y:"("+x+"-"+y+")",lambda x,y:"("+y+"-"+x+")",lambda x,y:"("+x+"*"+y+")",lambda x,y:"("+x+"/"+y+")",lambda x,y:"("+y+"/"+x+")"] | |
| def make(numlist,ans,siki): | |
| L=len(numlist) | |
| if L==1: |
NewerOlder