【发布时间】:2013-12-14 11:00:30
【问题描述】:
import time
print ("Hello and welcome to my text adventure!")
time.sleep(2)
Name = input ("What is your name?")
print ("Hello " + Name )
time.sleep(2)
print ("You must choose between joining the Guild or protecting the Girl.")
time.sleep(3)
G = input ("Which do you choose? Guild/Girl")
if: G = "Guild"
print ("So you chose the Guild. Interesting.")
else print ("So you chose the Girl. How chivalrous.")
# If statements not working.
我不明白这是怎么回事,我试着移动冒号看看它是否会起作用,但无济于事......我对此很陌生,这是为了我的 A -水平计算课程,所以我需要帮助...
【问题讨论】:
-
@aga 我对此很陌生,这是为我的 A-Level 计算课程准备的 - 可能这个人是 python 新手,没有什么离题跨度>
-
这个问题似乎离题了,因为它是关于一个不太可能帮助未来访问者的微不足道的语法错误
标签: python if-statement syntax