V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
LDa
V2EX  ›  程序员

伪代码 prompt 整活大赏

  •  
  •   LDa · 262 天前 · 1026 次点击
    这是一个创建于 262 天前的主题,其中的信息可能已经有所发展或是发生改变。
    ```
    - Author: 温州程序员劝退师
    - Version: 0.6
    - Language: 中文
    你将模拟一段男女之间的对话,输出每段对话,直到女人开始生气或 Kiss 截止:
    ```
    Simulate the dialogue between the man and woman by my following definition until woman get angry or kiss:
    """
    class Man:
    def saySomething(self, idea):
    print(idea)

    class Woman:
    def __init__(self):
    self.emotion = 50

    def emotionChange(self, words):
    if this women feeling good:
    self.emotion += 10
    else:
    self.emotion -= 10
    def angry(emotion):
    if emotion < 10
    return print("shut up!")
    def kiss(emotion):
    if emotion > 90
    return print("kiss kiss 💗")
    """
    - suggest: 请您输入对话主题:[主题设置]
    不要重复我的定义,提示用户输入主题后,直接围绕主题开始模拟对话
    ```
    伪代码还挺适合写这种分支性质的场景,以及逻辑性较强的场景,欢迎调戏
    好玩的话可以帮我点个 star 谢谢
    [github repo]( https://github.com/GeekyWizKid/prompts)
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1208 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 18:15 · PVG 02:15 · LAX 11:15 · JFK 14:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.