gpt4 book ai didi

compiler-errors - 莎士比亚变量分配不起作用

转载 作者:行者123 更新时间:2023-12-04 13:38:45 25 4
gpt4 key购买 nike

我浏览了莎士比亚的一些文档,但无法弄清楚如何使莎士比亚程序正常工作。

我尝试了以下方法:

Shakespeare, A Program.
Romeo, A young man.
Juliet, a young woman
Act I: A test of variables.
Scene I: The first scene.
[Enter Romeo and Juliet]
Hamlet: You are as stupid as a smelly big flower!

(这应该将Juliet设置为4,因为臭味= * 2,大= * 2,花= 1)
Juliet: Proceed to Scene II.
[Exeunt]
Scene I: The second scene.
[Enter Romeo and Juliet]
Juliet: Am I better than you?
Romeo: If so, you are as intelligent as the square root of Juliet.
Romeo: Open your heart.

这应该返回2,这是朱丽叶的值。不幸的是,这只会产生编译器错误。我究竟做错了什么?

最佳答案

一开始,您仅定义了Romeo和Juliet,并且具有2个场景I。我认为你的意思是

Shakespeare, A Program.

Romeo, A young man.
Juliet, a young woman.

Act I: A test of variables.

Scene I: The first scene.
[Enter Romeo and Juliet]
Romeo: <<This is important, because Hamlet is not defined!
You are as stupid as a smelly big flower!
Juliet: Proceed to Scene II.
[Exeunt]

Scene II: The second scene. <<You need to change it to Scene II!
[Enter Romeo and Juliet]
Juliet: Am I better than you?
Romeo: If so, you are as intelligent as the square root of Juliet.
Romeo: Open your heart.
[Exeunt]

这应该返回2。

关于compiler-errors - 莎士比亚变量分配不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27140270/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com