def gei(a, b):
'''
a, b: only positive integers! If you don't, we will make you. Max 1337
For extracting the juice of the numbers in the form of a common divider
'''
#Not Ruby, no to_i, but int()
smallest = int(abs(min(a, b)))
biggest = int(abs(max(a, b)))
print "You inputed: ", smallest, " and ", biggest, " their order doesn't matter."
print "Do you want to see guess numbers? Type 'yes', if you do! "
selection = raw_input()
print
print
#To evade infinite loops and too big numbers, we use count.
count = 0
ans = smallest
truth = str(selection) == str('yes')
def condition(ans, base):
ans1 = base % ans == 0
return ans1
while condition(ans, biggest) == False or condition(ans, smallest) == False:
ans -= 1
count += 1
if count >= 1337:
break
elif truth == True:
print ans
if truth == True:
print
print
print "After weeks of calculation, here is your greater common divider: "
return ans
そうそう、一般的なより大きな仕切りを抽出するための 8 年生の情報学の割り当て。私は疑問に思っていましたが、どうすれば面倒にならないようにすることができるか知っていますか? 内部で定義を使用したり、非常に多くの変数に名前を付けたりしないようにするにはどうすればよいですか?