python程序片段题
1.调用函数gcd()输出两个数的最大公约数
def gcd(x,y):
if x < y:
x,y = y,x
while (x % y) != 0:
r=x%
x = y
y = r
return y
a = eval(input())
b = eval(input())
gcdab = gcd(a,b)
print("{}and{}'s greatest common divisor is{}".format(a,b, gcd(a,b) ))
2.检查并统计字符串中包含英文单引号的对数
st = input()
pair=0
count=0
for s in st: