From 959e42ab223dc0334e7b5fe540374fdf6f501b4d Mon Sep 17 00:00:00 2001 From: 10_2 Date: Tue, 16 Jul 2024 09:03:37 +0800 Subject: [PATCH] Signed-off-by: 10_2 --- .idea/.gitignore | 3 ++ .idea/.name | 1 + .../inspectionProfiles/profiles_settings.xml | 6 +++ .idea/misc.xml | 4 ++ .idea/modules.xml | 8 ++++ .idea/杜奕扬.iml | 10 +++++ 2024.6.29.py | 25 +++++++++++ 2024.7.1.1.py | 9 ++++ 2024.7.1.py | 6 +++ 2024.7.16.py | 0 2024.7.3.py | 16 ++++++++ 2024.7.5.1.py | 14 +++++++ 2024.7.5.2.py | 5 +++ 2024.7.5.py | 41 +++++++++++++++++++ main.py | 16 ++++++++ 15 files changed, 164 insertions(+) create mode 100644 .idea/.gitignore create mode 100644 .idea/.name create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/杜奕扬.iml create mode 100644 2024.6.29.py create mode 100644 2024.7.1.1.py create mode 100644 2024.7.1.py create mode 100644 2024.7.16.py create mode 100644 2024.7.3.py create mode 100644 2024.7.5.1.py create mode 100644 2024.7.5.2.py create mode 100644 2024.7.5.py create mode 100644 main.py diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..359bb53 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# 默认忽略的文件 +/shelf/ +/workspace.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..cc87793 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +2024.7.5.2.py \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..4e4b288 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..4116874 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/杜奕扬.iml b/.idea/杜奕扬.iml new file mode 100644 index 0000000..525c8b3 --- /dev/null +++ b/.idea/杜奕扬.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/2024.6.29.py b/2024.6.29.py new file mode 100644 index 0000000..d397be8 --- /dev/null +++ b/2024.6.29.py @@ -0,0 +1,25 @@ +b='ABCCBACBAC' + +n=int(input('请输入人数')) +list=[] +for i in range(0,n): + list.append(input()) + +score=[0] +correct_daan=[""] + +count=1 +for j in list: + score.append(0) + correct_daan.append("") + daan=j + for i in range(0, 10): + if daan[i] == b[i]: + correct_daan[count] += b[i] + score[count] += 10 + else: + correct_daan[count] += 'X' + count+=1 + +for i in range(1,len(score)): + print("{}号学员,{}分数".format(i,score[i]),correct_daan[i]) diff --git a/2024.7.1.1.py b/2024.7.1.1.py new file mode 100644 index 0000000..b8c41fb --- /dev/null +++ b/2024.7.1.1.py @@ -0,0 +1,9 @@ +a=int(input('')) +b=65 +for i in range(1,a+1): + for j in range(1,i+1): + print(chr(b),end='') + b+=1 + if b>90: + b=65 + print('') diff --git a/2024.7.1.py b/2024.7.1.py new file mode 100644 index 0000000..2b46545 --- /dev/null +++ b/2024.7.1.py @@ -0,0 +1,6 @@ + + +for i in range(1 , 10): + for j in range(1,i +1): + print('{}X{}={}'.format(i , j , i*j),end=' ') + print(' ') diff --git a/2024.7.16.py b/2024.7.16.py new file mode 100644 index 0000000..e69de29 diff --git a/2024.7.3.py b/2024.7.3.py new file mode 100644 index 0000000..b0bac4d --- /dev/null +++ b/2024.7.3.py @@ -0,0 +1,16 @@ +import turtle +t=turtle.Turtle() +import random +t.speed(0) +t.pensize(10) +for i in range(180): + for j in range(8): + r=random.random() + g = random.random() + b = random.random() + t.pencolor(r,0.5,1) + t.forward(120) + t.right(360/8) + t.right(2) +turtle.done() + diff --git a/2024.7.5.1.py b/2024.7.5.1.py new file mode 100644 index 0000000..60ff6d9 --- /dev/null +++ b/2024.7.5.1.py @@ -0,0 +1,14 @@ +import turtle +import random +t=turtle.Turtle() +t.speed(0) +n=0 +m=0 +l=0 +for i in range(500): + t.forward(i) + t.left(91) + r = random.random() + g = random.random() + b = random.random() + t.pencolor(1, 1, b) diff --git a/2024.7.5.2.py b/2024.7.5.2.py new file mode 100644 index 0000000..8ca4f1f --- /dev/null +++ b/2024.7.5.2.py @@ -0,0 +1,5 @@ +n=int(input('')) +for i in range(n-1,1,-1): + if n%i==0: + print(i) + break \ No newline at end of file diff --git a/2024.7.5.py b/2024.7.5.py new file mode 100644 index 0000000..24d00ef --- /dev/null +++ b/2024.7.5.py @@ -0,0 +1,41 @@ +import turtle +import random +t=turtle.Turtle() +t.speed(0) +t.pencolor('yellow') +t.fillcolor(1,165/255,0) +t.begin_fill() +t=turtle.Turtle() +t.speed(0) +n=0 +m=0 +l=0 +for i in range(500): + t.forward(i) + t.left(91) + r = random.random() + g = random.random() + b = random.random() + t.pencolor('blue') +t.goto(0,0) +t.pencolor('yellow') +t.fillcolor(1,165/255,0) +t.begin_fill() +for a in range(10): + t.left(35) + for a in range(5): + t.forward(100) + t.left(72) + t.forward(100) + t.right(144) +t.end_fill() +t.pencolor('red') +t.speed(0) +t.fillcolor('yellow') +t.begin_fill() +for j in range(12): + for i in range(36): + t.forward(300) + t.left(170) + t.left(30) +t.end_fill() \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..90ffb6f --- /dev/null +++ b/main.py @@ -0,0 +1,16 @@ +# 这是一个示例 Python 脚本。 + +# 按 Shift+F10 执行或将其替换为您的代码。 +# 按 双击 Shift 在所有地方搜索类、文件、工具窗口、操作和设置。 + + +def print_hi(name): + # 在下面的代码行中使用断点来调试脚本。 + print(f'Hi, {name}') # 按 Ctrl+F8 切换断点。 + + +# 按间距中的绿色按钮以运行脚本。 +if __name__ == '__main__': + print_hi('PyCharm') + +# 访问 https://www.jetbrains.com/help/pycharm/ 获取 PyCharm 帮助