“jeu de quiz animal en python” Réponses codées

jeu de quiz animal en python


class Question:
    def __init__(self, text, answer):
        self.text = text
        self.answer = answer

question_bank = []
question_data = [
{"text": "A slug's blood is green.", "answer": "True"},
{"text": "The loudest animal is the African Elephant.", "answer": "False"},
{"text": "Approximately one quarter of human bones are in the feet.", "answer": "True"},
{"text": "The total surface area of a human lungs is the size of a football pitch.", "answer": "True"},
{"text": "In West Virginia, USA, if you accidentally hit an animal with your car, "
         "you are free to take it home to eat.", "answer": "True"},
{"text": "In London, UK, if you happen to die in the House of Parliament, "
         "you are entitled to a state funeral.", "answer": "False"},
{"text": "It is illegal to pee in the Ocean in Portugal.", "answer": "True"},
{"text": "You can lead a cow down stairs but not up stairs.", "answer": "False"},
{"text": "Google was originally called 'Backrub'.", "answer": "True"},
{"text": "Buzz Aldrin's mother's maiden name was 'Moon'.", "answer": "True"},
{"text": "No piece of square dry paper can be folded in half more than 7 times.", "answer": "False"},
{"text": "A few ounces of chocolate can to kill a small dog.", "answer": "True"}
]

for item in question_data:
    question_bank.append(Question(item["text"], item["answer"]))

print(question_bank)

Spotless Shrew

jeu de quiz animal en python

animal_list = ['Fish' , 'Tarantula' , 'Snake' , 'an Octopus']
animal=random.choice(animal_list)
print("Choice an animal:Fish,Tarantula,Snake and Octopus")
if     
Lonely Leopard

Réponses similaires à “jeu de quiz animal en python”

Questions similaires à “jeu de quiz animal en python”

Plus de réponses similaires à “jeu de quiz animal en python” dans Python

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code