【问题标题】:Answering certain input answers with print commands in python在 python 中使用打印命令回答某些输入答案
【发布时间】:2020-06-30 11:30:04
【问题描述】:

我正在使用 Python 代码进行编码,以便为您提供网站/视频的链接,我希望我的代码使用打印命令回答每个输入,说明您选择了 __ 这里是您可以观看 ___ 链接的地方:

这是我的代码,它有一个错误,我无法解决

import time

print ("Please put in anime yo``u would like to watch we have")
time.sleep(0.5)
Anime = input("Naruto,DragonBall:")
if input == "Naruto"
print("Test")

【问题讨论】:

标签: python if-statement input printing


【解决方案1】:
import time

print ("Please put in anime you would like to watch we have")
time.sleep(0.5)
Anime = input("Naruto,DragonBall:")
if Anime == "Naruto":
    print("Test")

【讨论】:

  • 如何添加多个 if Anime 语句
猜你喜欢
  • 1970-01-01
  • 2021-03-10
  • 1970-01-01
  • 1970-01-01
  • 2023-01-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多