From 0ea0fd2367de38df59a8e74462d848f60fb26be0 Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Sun, 14 Jul 2024 15:20:49 +0800 Subject: [PATCH] save project --- 123.py | 12 ++++++++++++ 555.py | 4 ++++ 777.py | 19 +++++++++++++++++++ __pycache__/func.cpython-37.pyc | Bin 0 -> 250 bytes func.py | 8 ++++++++ rtdf.py | 3 +++ 6 files changed, 46 insertions(+) create mode 100644 123.py create mode 100644 555.py create mode 100644 777.py create mode 100644 __pycache__/func.cpython-37.pyc create mode 100644 func.py create mode 100644 rtdf.py diff --git a/123.py b/123.py new file mode 100644 index 0000000..62930dc --- /dev/null +++ b/123.py @@ -0,0 +1,12 @@ +import turtle + +pen=turtle.pen() +screen=turtle.Screen() +screen.bgcolor("black") +colors=["red","orang","yellow","green"] +for i in range(1,300): + pen.forward(i) + pen.pencolo(colors[i%4]) + pen.right(91) +pen.hideturtle() +turtle.done() diff --git a/555.py b/555.py new file mode 100644 index 0000000..b781853 --- /dev/null +++ b/555.py @@ -0,0 +1,4 @@ +import func +data = func.new_input() +score = func.sum(data) +print("这位选手的总分数为:"+(score)) \ No newline at end of file diff --git a/777.py b/777.py new file mode 100644 index 0000000..c8889a1 --- /dev/null +++ b/777.py @@ -0,0 +1,19 @@ +def new_input(): + total = [] + while True: + money = input('请输入(q退出)') + break + else: + try: + money =int(money) + except: + else: + print("_"*30) +def sum(money): + count = 0 + for i in money: + count = count + i + return count +price = new_input() +pay = sum(price) +print("您一共消费了" + str(pay) + "元!扫码还是现金?") \ No newline at end of file diff --git a/__pycache__/func.cpython-37.pyc b/__pycache__/func.cpython-37.pyc new file mode 100644 index 0000000..e845ae6 Binary files /dev/null and b/__pycache__/func.cpython-37.pyc differ diff --git a/func.py b/func.py new file mode 100644 index 0000000..98d558a --- /dev/null +++ b/func.py @@ -0,0 +1,8 @@ +total = [] +while True: + unit= input("请输入:") + if unit== 'q': + break + else: + total.append(unit) +print(total) \ No newline at end of file diff --git a/rtdf.py b/rtdf.py new file mode 100644 index 0000000..7a4ef89 --- /dev/null +++ b/rtdf.py @@ -0,0 +1,3 @@ +j=3 +i=5 +print(j,"*",i,"=",(j*i)) \ No newline at end of file -- libgit2 0.25.0