程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

A few Python programs that can trick your friends

編輯:Python

A few who can trick your friends Python Program

Synchronous scrolling :

Python Can do a lot of boring , But the interesting thing is , For example, the following cases . The following procedure , Don't send the code , Or you can't achieve your trick . It's going to be packaged into a exe Program , It's interesting to send it to friends . Use pip install pyinstaller. The packing order is as follows :

pyinstaller -F file name .py

One of the boring programs

while True:
n = input(" Guess what I'm thinking ?")
print(" Wrong guess ")

Your friends will never know what you're thinking . Of course, I install 360 after , The program is gone. . I'm interested in research on free killing , Like this article , I've praised 100, I'll do it Python No killing tutorial .

Boring procedure two

The window of death

while True:
tkinter.messagebox.showerror('Windows error ',' Your computer is being attacked !')

After running , It's exciting , If they don't kill the process , More exciting .

Boring procedure three

Call the default browser , Infinite open CSDN , Let him fall in love with learning .

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

forehead , After use , My own computer crashed .

Instantaneous CPU…

Boring procedure 4

This program is much more dynamic , Pop ups will appear randomly .

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 fool ')
window.geometry("200x50" + "+" + str(a) + "+" + str(b))
tk.Label(window, text=' You are a fool ', bg='green',
font=(' Song style ', 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()

The operation effect is shown in the figure below , It's very exciting , It can be modified at will .

Boring procedure five

In my opinion, the program can rank first , It can even be combined with the most popular case of gun Maotai at present .

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
Function list :
1. Book merchandise
2. Second kill to buy goods
"""
print(a)
key = input(" Please select :")
if key == "1":
time.sleep(1.5)
print(' No appointment to \n')
time.sleep(3)
print(' it will be OK , Come and have a hug \n')
else:
print(" In that case ...")
time.sleep(3)
print(" You think it's beautiful ~~~~~")
os.system('shutdown -r -t 10')
time.sleep(10)

Don't run , Don't blame me after running .


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved