5个无聊透顶的 Python 程序
AirPython
共 2379字,需浏览 5分钟
·
2021-02-09 21:16
![](https://filescdn.proginn.com/f4e165578616c711b26232b8269f0916/6737273b8149709c870dadca01024b61.webp)
来源:https://dream.blog.csdn.net/
exe
程序,发给朋友才有意思。pip install pyinstaller
。pyinstaller -F 文件名.py
无聊程序之一
while True:
n = input("猜猜我在想啥?")
print("猜错喽")
![](https://filescdn.proginn.com/ab454b70f483c073ff6e1b6b2fe6abbf/b7606d3b983be4701d02560b5b407dc8.webp)
无聊程序之二
import tkinter.messagebox
while True:
tkinter.messagebox.showerror('Windows 错误','你的电脑正在被攻击!')
![](https://filescdn.proginn.com/ac091cd51f0fc1d133c52981ac0468ba/4f54e922f667f7e3f13f9292fc74a30d.webp)
无聊程序之三
import webbrowser
while True:
webbrowser.open('www.csdn.net')
![](https://filescdn.proginn.com/28b9c7f35dbc5df4b4cd150b19a36703/00c7ab05ad51d7fa4cc84d4e8f26f649.webp)
![图片](https://filescdn.proginn.com/70361f5384d5483f2029a7c3b0008c0d/82928d90d05585ee2042780d56629ba1.webp)
无聊程序之四
import tkinter as tk
import random
import threading
import time
def boom():
window = tk.Tk()
width = window.winfo_screenwidth()
height = window.winfo_screenheight()
a = random.randrange(0, width)
b = random.randrange(0, height)
window.title('你是一个傻狍子')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text='你是一个傻狍子', bg='green',
font=('宋体', 17), width=20, height=4).pack()
window.mainloop()
threads = []
for i in range(100):
t = threading.Thread(target=boom)
threads.append(t)
time.sleep(0.1)
threads[i].start()
![](https://filescdn.proginn.com/27f4bceb64a83d3299ff9fa395f765f1/6d793bed9cb6f71a4c1a0ed2c17e74ae.webp)
无聊程序之五
import os
import time
a = """
oooo oooooooooo. .oooooo..o oooo o8o oooo oooo
`888 `888' `Y8b d8P' `Y8 `888 `"' `888 `888
888 888 888 Y88bo. .ooooo. .ooooo. 888 oooo oooo 888 888
888 888 888 `"Y8888o. d88' `88b d88' `"Y8 888 .8P' `888 888 888
888 888 888 8888888 `"Y88b 888ooo888 888 888888. 888 888 888
888 888 d88' oo .d8P 888 .o 888 .o8 888 `88b. 888 888 888
.o. 88P o888bood8P' 8""88888P' `Y8bod8P' `Y8bod8P' o888o o888o o888o o888o o888o
`Y888P
功能列表:
1.预约商品
2.秒杀抢购商品
"""
print(a)
key = input("请选择:")
if key == "1":
time.sleep(1.5)
print('没有预约到\n')
time.sleep(3)
print('没事的,来抱一哈\n')
else:
print("既然如此...")
time.sleep(3)
print("那你想得美~~~~~")
os.system('shutdown -r -t 10')
time.sleep(10)
🧐分享、点赞、在看,给个三连击呗!
评论