[attached Python version of teaching] "reasons for resignation of wonderful flowers used in those years" hahaha, I laughed after reading it.

Introduction Hello! Hello! Hello, I'm mumuzi. Today's update is coming~ Recently, the National Day is too long, which le...
Introduction
text
Text start——
summary

Introduction

Hello! Hello! Hello, I'm mumuzi. Today's update is coming~

Recently, the National Day is too long, which leads to a lot of guys playing crazy, and then they don't come to work. What's wrong with it? I met a colleague who asked for leave!!

Boss: OK (clever).

Now, in addition to meeting a lot of friends asking for leave, have you met a lot of people who want to resign?

When water flows to the bottom and people go to the top, resignation is inevitable. So let's talk about how to write the resignation letter?

When we choose to leave one company to another, it may be because of low wages or being far away from home. So, when we resign, how do we write our resignation?

Today, Xiaobian will give you a small class of resignation! Ha ha ha, you can leave directly after you send it. The following code is for entertainment only!

text

      The reasons in the resignation report should be sufficient and credible. Because only when the reasons are sufficient and credible can it be approved. The language should be accurate, the words should be simple, the wording should be euphemistic and sincere, and euphemistic and sincere words should be used to show the sincerity of resignation.

Humorous snippet——

Boss, leave me, you will live better!

Sorry, I'm a man with a dream. I'm going back to raise pigs ↓↓

Sorry, my wings are hard ↓↓

Be justified, not ashamed of your parents ↓↓

It is my responsibility to maintain world peace and protect the earth. Farewell ↓↓

My ideal is not to go to work ↓↓

Ha ha ha! Write code every day, but also relax! Well, after the entertainment, Xiaobian began to get down to business~

Text start——

(1) Environmental installation.

This article is an interface applet based on tkinter, including Python installation, pychar installation, pilot module and some built-in modules.

Unified module installation:

pip install -i https://Pypi. Doublan. COM / simple / + module name

(2) Thinking framework.

The boss can't close the window whether he closes it or doesn't agree. Finally, he can only agree

The main functions of resignation letter include: agree, disagree and close the window.

  • Agree: click agree to pop up a prompt box. Click the button on the prompt box to close the whole window.

  • Disagree: click disagree, disagree to move, click move once.

  • Close window: Click   X   No. close the window and pop up the humiliation prompt box.

Effects of clicking different buttons:

(3) The code implements four steps.

01.Tkinter interface setting window size, selected interface pictures, buttons, etc.

if __name__ == '__main__': window = tk.Tk() window.title('letter of resignation') width = 600 height = 650 screenwidth = window.winfo_screenwidth() screenheight = window.winfo_screenheight() alignstr = '%dx%d+%d+%d' % (width, height, (screenwidth - width) / 2, (screenheight - height) / 2) window.geometry(alignstr) # Set whether the window can be variable in length and width window.resizable(width=False, height=True) window.geometry('600x600') window.protocol("WM_DELETE_WINDOW", closeWindow) load = Image.open('02.jpeg').resize((300, 310)) render = ImageTk.PhotoImage(load) L2 = tk.Label(window, image=render) L2.place(x=150, y=100) B1 = tk.Button(window, text='agree', command=agree) B1.place(x=155, y=420) B2 = tk.Button(window, text='disagree', command=disagree) B2.place(x=400, y=420) window.mainloop()

02. Consent code.

def agree(): win = tk.Toplevel(window) win.geometry("500x150+{}+{}". format(int((screenwidth - width) / 2), int((screenheight - height) / 2))) win.title("resignation") label = tk.Label(win, text="Your mouse tail juice", font=("Chinese block letters", 20)) label.pack() btn = tk.Button(win, text="Get out of here", width=6, height=1, command=window.destroy) btn.pack()

03. Disagree code.

def disagree(): B2.place_forget() B2.place(x=random.randint(100, 500), y=random.randint(100, 500))

04. Close window code.

def closeWindow(): messagebox.showinfo(title="If you don't agree, you can't close it", message="Can't close it, hehe") return

The effect is as follows——

Figure I

Figure II

summary

As the saying goes, a life without resignation is incomplete (as the saying goes: I didn't say it). Then write here!

Your support is my biggest motivation!! Remember the third company ~mua   Welcome to read previous articles~

1 November 2021, 21:04 | Views: 2337

Add new comment

For adding a comment, please log in
or create account

0 comments