NearDunphy 发表于 2017-12-9 15:27:09

小白求助,么么哒

thought = input("猜猜大波哥现在在想什么:")
if thought == '想你':
    print("UGH!U dirty!!!")
else:
    print("Opps!lalalalalala")
thought = input("猜猜大波哥现在在想什么:")
if thought == '想你':
    print("UGH!U dirty!!!")
else:
    print("U just have 2 more time left!")
thought = input("猜猜大波哥现在在想什么:")
if thought == '想你':
    print("UGH!U dirty!!!")
else:
    print("U just have 1 more time left!!")
thought = input("猜猜大波哥现在在想什么:")
if thought == '想你':
    print("UGH!U dirty!!!")
else:
    print("U idiot")
input("Press <enter>")
问题:
        如何在中途答对后,问题不再冒出,即程序终止
      求大神们

NearDunphy 发表于 2017-12-9 15:37:56

已摸索解决,小白第一天学python,见谅

z199312 发表于 2017-12-9 15:43:49

震惊了你的写法 请看小甲鱼视频第七到第九课 了不起的分支与循环。。 一步步来 不要急。。

像番茄加两个蛋 发表于 2017-12-9 15:48:16

加油!努力学习终有一日成为大神!

BngThea 发表于 2017-12-9 17:15:36

break
页: [1]
查看完整版本: 小白求助,么么哒