趣味问答、文字游戏

还时不时发出不可描述的叫声

  • 郭德纲:

    • 从 小便 认识,现在 大便 样;
  • 国王与大公鸡,国王问你猜我会怎么吃你,是红烧还是清炖?

    • 如果猜错了,我就红烧;
    • 如果猜对了,我就清炖;
      • 这里存在一种悖论,大公鸡可以永远猜红烧,如果国王心中所想是红烧,则猜对了就变成了清炖,悖论;如果国王心中所想是清炖,猜错了,悖论;
  • “当跑步时你在想什么” ⇒ “我现在到底跑了几圈了?”

1. 内涵问答

  • 世界上第一例外科手术:上帝造夏娃;
    • God created Eve from a rib taken out of Adam. This clearly required surgery

2. 文字游戏

  • 你喜欢我哪一点?离我远一点;

转载于:https://www.cnblogs.com/mtcnn/p/9424278.html

以下是一个简单的Python tkinter趣味问答的例子: ```python import tkinter as tk class Question: def __init__(self, prompt, answer): self.prompt = prompt self.answer = answer question_prompts = [ "What color are apples?\n(a) Red/Green\n(b) Purple\n(c) Orange\n\n", "What color are bananas?\n(a) Teal\n(b) Magenta\n(c) Yellow\n\n", "What color are strawberries?\n(a) Yellow\n(b) Red\n(c) Blue\n\n" ] questions = [ Question(question_prompts[0], "a"), Question(question_prompts[1], "c"), Question(question_prompts[2], "b") ] def check_answer(): global question_number global score if user_answer.get().lower() == questions[question_number].answer: score += 1 question_number += 1 if question_number == len(questions): question_text.config(text="Quiz completed! Final score: " + str(score)) answer_entry.destroy() submit_button.destroy() else: question_text.config(text=questions[question_number].prompt) user_answer.set("") score = 0 question_number = 0 root = tk.Tk() root.title("Python Quiz") question_text = tk.Label(root, text=questions[question_number].prompt, font=("Arial", 12)) question_text.pack(pady=10) user_answer = tk.StringVar() answer_entry = tk.Entry(root, textvariable=user_answer, font=("Arial", 12)) answer_entry.pack(pady=10) submit_button = tk.Button(root, text="Submit", command=check_answer) submit_button.pack(pady=10) root.mainloop() ``` 这个程序会问三个问题,每个问题都有三个选项。用户需要选择正确的选项来回答问题。程序会在用户回答完所有问题后显示用户的得分。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值