Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- #-*- coding: utf-8 -*-
- from random import randint
- questions = [
- ['Réponse universelle\n','42'],
- ['Vous avez dis leet\n','1337']
- ]
- score = 0
- while True:
- i = randint(0, len(questions)-1)
- question = questions[i]
- answer = input(question[0])
- if answer == "stop":
- print("Score: " + str(score))
- break
- elif answer == question[1]:
- score += 1
- print("Bravo")
- else:
- score -= 1
- print("Mauvaise réponse.")
- print(question[1] + " était la bonne réponse.")
- print("Score: " + str(score))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement