python不显示输出结果_Python个性测试,如何显示一个输出而不是所有输出

我正在努力创造一个“你会在哪个电视节目中表现最好”

然而,当它输出显示你应该在的-它说所有的。我怎么解决这个问题?在

我不在乎我是否花了很长的路来完成代码-我只想知道如何修复说一个答案。谢谢。在def quiz():

print("Hello- what is your name?")

name = input("Name: ")

print("Hello " + str(name) + ", I will be asking you some questions today to find out what television show you'd be best in.")

print(" ")

print("Are you ready?")

print("Please answer with YES or NO: ")

response = input()

if response.lower() == 'yes':

print(" ")

print("Alrighty then.")

print(" ")

print("Do you prefer to: ")

print(" ")

print("Laugh")

print("Think")

print("Fight")

print(" ")

q1 = input("Choose carefully: ")

print(" ")

print("Type of Villain?")

print(" ")

print("Supernatural")

print("Humans")

print("Social Pressure")

print(" ")

q2 = input("Death by: ")

print(" ")

print("Genre: ")

print(" ")

print("Action")

print("Comedy")

print("Drama")

print("Horror")

print(" ")

q3 = input("What will you pick: ")

print(" ")

print("You like to dress: ")

print("Trendy")

print("Casual")

print("Eccentric")

print("Elegantly")

print("Whatever I can get my hands on")

q4 = input("Fasionably...: ")

print(" ")

print("What would you use to defend yourself in a bad situation: ")

print("My own intelligence")

print("Bow and Arrows")

print("My teeth")

print("A sword or something sharp")

print("Electronic Device")

print("What bad situation...")

print("A gun")

q5 = input("Incidentally enough- pick your poison: ")

print(" ")

print("Which superower seems the best to you: ")

print("Super Strength")

print("Hyper-Observance")

print("Advanced Intelligence")

print("Invisibility")

print("Teleportation")

print("Telepathy")

print("Immortality")

q6 = input("Power: ")

if q1.lower() == 'laugh' or '1':

if q2.lower() == 'humans' or '2':

if q3.lower() == 'action' or 'comedy' or '1' or '2':

if q4.lower() == 'casual' or '2':

if q5.lower() == 'my own intelligence' or 'intelligence' or 'my' or 'own' or '1':

if q6.lower() == 'hyper-observance' or 'hyper' or 'observance' or '2':

print("Your television show is... Psych!")

if q1.lower() == 'think':

if q2.lower() == 'humans':

if q3.lower() == 'drama' or '3' or 'action' or '1':

if q4.lower() == 'elegantly' or '4':

if q5.lower() == 'a sword or something sharp' or 'a' or 'sword' or 'or' or 'something' or 'sharp' or 'something sharp' or '4' or 'bow and arrows' or 'bow' or 'arrows' or '2':

if q6.lower() == 'advanced intelligenct' or 'intelligence' or '3':

print("Your television show is... Game of Thrones!")

if q1.lower() == 'think' or '2' or 'fight' or '3':

if q2.lower() == 'humans' or '2' or 'social pressure' or 'social' or 'pressure' or '3':

if q3.lower() == 'comedy' or '2' or 'drama' or '3' and q4.lower() == 'trendy' or '1':

if q5.lower() == 'my own intelligence' or 'my' or 'own' or 'intelligence' or '1' or 'electronic device' or 'electronic' or 'device' or '5' or 'what bad situation?' or 'what' or 'bad' or 'situation' or 'what bad situation' or '6':

if q6.lower() == 'advanced intelligence' or 'intelligence' or '3' or 'telepathy' or '6':

print("Your television show is... Gossip Girl!")

if q1.lower() == 'think' or '2' or 'fight' or '3':

if q2.lower() == 'humans' or '2' or 'supernatural' or '1':

if q3.lower() == 'action' or 'drama' or '1' or '3':

if q4.lower() == 'casual' or '2' or 'whatever i can get my hands on' or '5':

if q5.lower() == 'my own intelligence' or 'intelligence' or 'my' or 'own' or '1' or 'a gun':

if q6.lower() == 'super strength' or 'super' or 'strength' or '1' or 'invisibility' or '4':

print("Your television show is... The Walking Dead!")

if q1.lower() == 'think' or '2' or 'fight' or '3':

if q2.lower() == 'supernatural' or '1' or 'humans' or '2':

if q3.lower() == 'action' or '1' or 'horror' or '4':

if q4.lower() == 'whatever i can get my hands on' or '5':

if q5.lower() == 'my' or 'own' or 'intelligence' or 'my own intelligence' or '1':

if q6.lower() == 'teleportation' or '5':

print("Your television show is... Lost!")

if q1.lower() == 'laugh' or '1':

if q2.lower() == 'social pressure' or 'social' or 'pressure' or '3':

if q3.lower() == 'comedy' or '2' or 'drama' or '3':

if q4.lower() == 'trendy' or '1' or 'casual' or '2':

if q5.lower() == 'what bad situation' or 'what' or 'bad' or 'situation' or 'what bad situation?' or '6':

if q6.lower() == 'telepathy' or '6':

print("Your television show is... Friends!")

if q1.lower() == 'think' or '2' or 'fight' or '3':

if q2.lower() == 'humans' or '2':

if q3.lower() == 'drama' or '3' or 'horror' or '4':

if q4.lower() == 'casual' or '2':

if q5.lower() == 'my own intelligence' or 'intelligence' or '1' or 'a gun' or 'gun' or '7':

if q6.lower() == 'hyper observance' or 'hyper' or 'observance' or '2' or 'telepathy' or '6':

print("Your television show is... Criminal Minds!")

if q1.lower() == 'think' or '2' or 'fight' or '3':

if q2.lower() == 'supernatural' or '1':

if q3.lower() == 'horror' or '4':

if q4.lower == 'casual' or '2':

if q5.lower() == 'my own intelligence' or 'intelligence' or '1' or 'electronice device' or 'electronic' or 'device' or '5':

if q6.lower() == 'telekinesis' or '8':

print("Your television show is... Stranger Things")

if q1.lower() == 'fight' or '3':

if q2.lower() == 'supernatural' or '1' or 'humans' or '2':

if q3.lower() == 'action' or '1' or 'drama' or '3':

if q4.lower() == 'eccentric' or '3' or 'casual' or '2':

if q5.lower() == 'bow and arrows' or 'bow' or 'arrows' or '2':

if q6.lower() == 'super strength' or 'super' or 'strength' or '1':

print("Your television show is... Arrow!")

if q1.lower() == 'fight' or '3':

if q2.lower() == 'supernatural' or '1':

if q3.lower() == 'drama' or '3' or 'horror' or '4':

if q4.lower() == 'trendy' or '1':

if q5.lower() == 'my teeth' or 'teeth' or '3':

if q6.lower() == 'immortality' or '7':

print("Your television show is... Vampire Diaries!")

elif response.lower() == 'no':

print("Goodbye then.")

else:

print("Please come back when you're not such a child.")

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值