我想知道如何选择测验,例如科学和社会问题 [英] I would like to know how to selct from choice of quiz for example science and soccor questions

查看:65
本文介绍了我想知道如何选择测验,例如科学和社会问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

print( "Hello and welcome to my Quiz\n")

#Random Questions And Answers

#Soccor Questions
one = input("All four home nations – England, Scotland, Wales and Northern Ireland – played at the 1958 World Cup. Where did it take place?\n")
two = input("How many of the 20 clubs in MLS are based in Canada?\n")
three = input("In which country would you find the world's largest football stadium (by capacity)?\n")
four = input("In 2002 on the same day as the World Cup final, 'The Other Final' took place between the world's two lowest ranking nations. Who won the game?\n")
five = input("Who finished the 2014-15 Ligue 1 season as top scorer?\n")
six = input("Which club have won the most Serie A titles?\n")


#Science Questions
seven = input("Brass gets discoloured in air because of the presence of which of the following gases in air?\n")
eight = input("Chlorophyll is a naturally occurring chelate compound in which central metal is ?\n")


#Answer to Soccor Questions
onea = "Sweeden"
twoa = "Three"
threea = "North Korea"
foura = "Bhutan"
fivea = "Alexandre Lacazette"
sixa = "Juventus"

#Answers to Science Questions
sevena = "Hydrogen sulphide"
eighta = "Bromine"

print("")

# User will be notified if answer is correct or wrong
if one == onea:
    print("1.This is correct")
else:
    print("1.Wrong Answer")

if two == twoa:
    print("2.This is correct")
else:
    print("2.Wrong Answer")

if three == threea:
    print("3.This is correct")
else:
    print("3.Wrong Answer")

if four == foura:
    print("4.This is correct")
else:
    print("4.Wrong Answer")

if five == fivea:
        print("5.This is correct")
else:
        print("5.Wrong Answer")

if six == sixa:
        print("6.This is correct")
else:
        print("6.Wrong Answer")

if seven == sevena:
        print("7.This is correct")
else:
        print("7.Wrong Answer")

if eight == eighta:
        print("8.This is correct")
else:
        print("8.Wrong Answer")







我的尝试:



i已经尝试查看元组但不确定因为我只是python的初学者我想知道我是否可以为每个问题找到多个答案并且帮助将会很感激谢谢我我正在使用python 3.4.1我希望从a,b,c,d




What I have tried:

i have tried looking at tuples but was not sure as im only a beginner of python i would like to know if i could have multiple answers for each questions and help would be grateful thanks i am using python 3.4.1 i would like to have different choice of answers from a,b,c,d

推荐答案

中选择不同的答案。参见 Python教程 - Python 3.3.6文档 [ ^ ]。
See The Python Tutorial — Python 3.3.6 documentation[^].


这篇关于我想知道如何选择测验,例如科学和社会问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆