Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

Administrator / lesson11_4

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Commit 4429737c authored 3 years ago by BellCodeEditor's avatar BellCodeEditor
Browse files
Options
  • Browse Files
  • Download
  • Email Patches
  • Plain Diff

auto save

parent dc70412a
Show whitespace changes
Inline Side-by-side
Showing with 29 additions and 0 deletions
  • diy2.py
  • diy3.py
  • diy4.py
diy2.py 0 → 100644
View file @ 4429737c
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
This diff is collapsed. Click to expand it.
diy3.py 0 → 100644
View file @ 4429737c
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("不能组成三角形")
This diff is collapsed. Click to expand it.
diy4.py 0 → 100644
View file @ 4429737c
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
This diff is collapsed. Click to expand it.
  • Write
  • Preview
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