Commit 4429737c by BellCodeEditor

auto save

parent dc70412a
Showing with 29 additions and 0 deletions
num=input("请输入所要相加的数字:")
num2=int(input("请输入相加的次数:"))
sum=0
str=""
for i in range(num2):
str=str+num
sum=int(str)+sum
print(sum)
\ No newline at end of file
str=input("请输入三条边:")
nums=eval(str)
c=list(nums)
c.sort()
print(c)
if c[0]+c[1]>c[2]:
print("边长{}{}{}能组成三角形".format(c[0],c[1],c[2]))
if c[0]==c[1] or c[1]==c[2]:
print("是等腰三角形")
elif c[0]**2 + c[1]**2 == c[2]**2:
print("是直角三角形")
else:
print("是普通三角形")
else:
print("不能组成三角形")
for i in range(1,10):
for j in range(1,i+1):
print(str(j)+"*"+str(i)+"="+str(j*i),end="\t")
print()
\ 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