# 文本编辑器 from tkinter import * import tkinter.messagebox from tkinter.filedialog import askopenfilename from tkinter.filedialog import asksaveasfilename class FileEditor: def _…
import socket import tkinter.messagebox from tkinter import * class portScan: def __init__(self): window = Tk() window.title("端口扫描") frame = Frame(window) frame.pack() Label(f…
import socket from tkinter import * class ipAddress: def __init__(self): window = Tk() window.title("ipAddress") frame = Frame(window) frame.pack() Label(frame, text="域名:").gr…
import random class Riddle: def __init__(self, question, answer): self.__question = question self.__answer = answer def getQuestion(self): return self.__question def isRight(s…
import random # 前世 class PastLife: def __init__(self, name, profession, life, causeOfDeath): self.name = name self.profession = profession self.life = life self.causeOfDeath =…
import random min = 1 max = 100 number = random.randint(min, max) print(number) count = 0 while count < 10: guess = eval(input("Please enter a number between {} and {}:".fo…
from tkinter import * import random # 游戏设置 GAME_WIDTH = 800 # 游戏宽度 GAME_HEIGHT = 800 # 游戏高度 SPEED = 50 # 贪吃蛇速度 SPACE_SIZE = 50 # 游戏单个部件的大小 BODY_PARTS = 3 # 贪吃蛇初始长度 SNAKE_COLOR…