Python can do a lot of boring, but interesting things, such as the following examples. The following procedures, do not send code, or can not achieve the purpose of your prank. Package it into an EXE program and send it to a friend. Use PIP Install PyInstaller. The package command is as follows:

Pyinstaller -f Filename.pyCopy the code

If a BUG (usually a coding error) occurs during the process, a solution is provided at the end of the article

One of the boring programs

While True: n = input(" Guess what I'm thinking?" ) print(" Guess wrong ")Copy the code

Your friends will never know what you’re thinking. Of course, after I installed the 360, the program was gone. If you are interested in studying no-kill, you can give this article a thumbs up. After 100 thumbs up, I have a Python no-kill tutorial.

Boring program number two

Siming popup window

The import tkinter. Messagebox while True: tkinter messagebox. Showerror (' Windows error ', 'your computer under attack! ')Copy the code

After running, very exciting, if the other side will not kill the process, even more exciting.

Boring program number three

Call the default browser, open CSDN unlimited, let him love learning.

import webbrowser
while True:
     webbrowser.open('www.csdn.net')
Copy the code

Well, after using it, my own computer crashed.

The instant CPU…

Boring program number four

This program is much more dynamic, will randomly pop up.

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(' you are a foolish roe deer ') window.geometry("200x50" +" + STR (a) +" +" + STR (b)) tk.label (window, Text = 'you are a silly roe deer, bg =' green ', the font = (' song typeface, 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] the start ()Copy the code

The running effect is shown in the picture below, which is very exciting and can be modified at will.

Boring program number five

In my opinion, this program can be ranked number one, and can even be combined with the current most popular gun Maotai case.

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 O888O Y888P Functions: 1. "" print(a) key = input(" please select ") if key == "1": Print (' not available ') print(' not available ') else: print(' not available ') print(' not available ') ) time.sleep(3) print(" ~~~~~") os.system('shutdown -r-t 10') time.sleep(10)Copy the code

Don’t run it. Don’t blame me when you run it.

At the end of the article

Your likes collection is the biggest encouragement to me! Welcome to follow me, share Python dry goods, and exchange Python technology. If you have any comments or technical questions about this article, please leave a comment in the comments section.