Question Engine for Trivia Queston DB
Project description
Quiz Engine for Trivia
Getting Started
Quiz Engine for Trivia module
Easy to create a quiz game by using this module.
Prerequisites
You have python 3 installed.
Use
In a terminal do following
pip install tirsvadCLI-quiz_engine_4_trivia
from QuizEngine4Trivia import QuizEngine
import html
quiz = QuizEngine()
while quiz.still_has_questions():
print(f"Your score : {quiz.score}\n\n")
current = quiz.next_question()
print({html.unescape(current.question)})
count = 0
for possible_answer in current.possible_answers:
print(f"{count}: {html.unescape(possible_answer)}")
count += 1
user_answer = int(input("Answer .:"))
if 0 <= user_answer <= count:
if quiz.check_answer(current.possible_answers[user_answer]):
print("You are right")
else:
print("You are wrong")
print("You've completed the quiz")
print(f"Your final score was: {quiz.score}/{quiz.question_number}")
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
Fork the Project
- Fork the Project
- Create your Feature Branch
- Commit your Changes
- Push to the Branch
- Open a Pull Request
Example
git checkout -b feature
git commit -m 'Add my feature enhance to project'
git push origin feature
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for quizengine4trivia_tirsvadcli-0.0.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0332af5e862916c5b871820b82e374802457eed8e366e5728e2a25c6723c813 |
|
MD5 | 04a02f704fe34fa441c15c20a57d2381 |
|
BLAKE2b-256 | 972061385724c8cc8a9d9b644478b9da82f2d1997e6cb245cf852e9e1eb46c70 |
Close
Hashes for QuizEngine4Trivia_TirsvadCLI-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a234093a00d335188cbf9cfaf9f52d47ebdffef6a628c8de21460c929108d694 |
|
MD5 | 600e854d488416b8912ac23b9fe486c7 |
|
BLAKE2b-256 | 4991f9d08afdafcd86a6fd6aee6343fb56c49091b166c0331a280a56e864df30 |