摘要: from random import randintfrom tkinter import *import tkinter.messagebox as msgboxtk = Tk()tk.title("电子算盘") # 窗口名称tank = Canvas(tk, width=1000, height 阅读全文
posted @ 2024-04-24 20:32 记得关月亮 阅读(2) 评论(0) 推荐(0) 编辑
摘要: def sierpinski_triangle(n): if n == 1: return " /\\", "/--\\" prev_triangle = sierpinski_triangle(n - 1) size = len(prev_triangle) new_triangle = [] # 阅读全文
posted @ 2024-04-24 20:26 记得关月亮 阅读(2) 评论(0) 推荐(0) 编辑
摘要: if __name__ == '__main__': # 读取输入的表达式和变量值 expression = input() variables = input().split(",") # 将变量值转换为字典形式 variables = dict(item.split('=') for item 阅读全文
posted @ 2024-04-24 20:25 记得关月亮 阅读(3) 评论(0) 推荐(0) 编辑