<p>我不知道该如何用语言来表达我的问题。你知道吗</p>
<p>这个代码是我做的骰子游戏的一部分。当游戏开始时,用户有一个多选选项,即:</p>
<p><code>Please enter 'n' if you are a new user, 'e' if you are an existing user, or 's' to display scores, or 'f' if you forgot your password:</code></p>
<p>例如,如果用户输入字母<code>n</code>,它会让他们为游戏创建一个新帐户,然后我会调用函数<code>ens1</code>,让他们选择做某事。你知道吗</p>
<p>我遇到的问题是,如果用户在创建帐户后输入<code>n</code>来创建一个新帐户,我调用函数<code>ens1</code>,让他们选择做其他事情,并说他们想通过输入<code>e</code>来启动游戏,什么都不会因为某种原因发生,我也不知道为什么会发生这种情况。你知道吗</p>
<pre><code>def ens1():
global ens
print("\n")
ens = input("Please enter 'n' if you are a new user, 'e' if you are an existing user, or 's' to display scores, or 'f' if you forgot your password: ")
while ens not in ('e', 'n', 's', 'f'):
ens = input("Please enter 'n' if you are a new user, 'e' if you are an existing user, or 's' to display scores, or 'f' if you forgot your password: ")
if ens == "f": # f stands for forgotton password
#code here
ens1()
if ens == "e": # e stands for existing user
#code here
ens1()
if ens == "n": # n stands for new account
#code here
ens1()
if ens == "s": # s stands for scores
#code here
ens1()
</code></pre>