Commit cfbf4913 by BellCodeEditor

auto save

parent bb513e07
def gcd(a,b):
i=1
c=0
if a<b:
while i==a:
if a%i==0 and b%i==0:
c=i
i=i+1
else:
i=i+1
print(c)
elif a>b:
while i==b:
if a%i==0 and b%i==0:
c=i
i=i+1
else:
i=i+1
print(c)
else:
print(a)
gcd(6,9)
\ No newline at end of file
# sum=0
# for i in range(1,10,3):
# sum=sum+i
# print(sum,i)
# s1="abcde"
# s2="fgh"
# s3=s1+s2
# s3=s3[4:7]
# print(s3)
# a=int("0b10000",10)
# b=int("16",10)
# c=int("0o020",10)
# d=int("0x10",10)
# print(b)
# s="www.baidu.com"
# b=s.split(".")
# print(b)
# i=1
# while i<=10:
# i+=1
# if i%2>0:
# continue
# print(i)
# character = ["诚实", "感恩", "坚持", "守时"]#,运行以下代码的结果是( )
# if not("怜悯" in character):
# character.append("怜悯")
# print(character[1] + character[-1])
# float('something')
# a=hex(1e)
# print(a)
# ls=['武汉','温州','香港','重庆']
# f=open('city.csv','w')
# f.write(','.join(ls)+'\n')
# f.close()
# print(f)
# a=divmod(36,10)
# print(a)
# def demo(x):
# return x*2;
# print(demo(demo(demo(1))))
# def domain2(a,b):
# a = a+b
# return a
# a = 2
# print(domain2(2,a))
# def sum(num1,num2):
# num1=num1+1
# num2=num2+2
# result=num1+num2
# return result
# a=3
# b=4
# c=sum(a,b)
# print("a=",a,"b=",b,"c=",c)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment