基本的に、ボタンボックスに複数の画像を使用して、EasyGuiを使用してPython 3.4でクイズのタイプを作成したいと考えています。それがどのように機能すると私が想像するかは、次のようになります。
import easygui as eg
# A welcome message
eg.msgbox ("Welcome to the quiz", "Quiz!")
# A short splash screen this could be looped
Finish = "Start"
while Finish == "Start":
Finish = eg.buttonbox("Do you want to start the quiz or quit?","Welcome",["Start","Quit"])
if Finish == "Quit":
break
#Question 1
image = "mickey.gif"
choices = ["Mickey","Minnie","Daffy Duck","Dave"]
reply=eg.buttonbox("Who is this?",image = image,choices = choices)
if reply == "Mickey":
eg.msgbox("Well done!","Correct")
else:
eg.msgbox("Wrong","Failure")
これは機能しますが、行を変更すると
reply=eg.buttonbox("Who is this?",image=[image,image2,image3,image4],choices = choices)
しかし、それはうまくいかないようです。ボタンボックスごとに複数の画像を持つことができるかどうかは誰にもわかりませんか?