Giter VIP home page Giter VIP logo

world-capitals-quiz-game's Introduction

WORLD CAPITAL QUIZ GAME

The World Capitals Quiz Game is a fun and educational game that tests the player's knowledge of the world's capital cities. The game presents you with a list of countries and asks you to guess the corresponding capital city.

The quiz game is built with Python3 and runs in the Code Institute mock terminal for Heroku.

Live version of the quiz, here.

am i responsive

How to play

  • The player will be presented with the game's title and rules.
  • The game will ask the player if she/he wants to play, and answer yes/ no.
  • The game will ask the player to enter your name.
  • You will be asked a series of questions, asking you to name the capital city of a specific country.
  • Answer each question by typing in the name of the corresponding capital city.
  • If the player answers a question correctly, she/he will receive
    one point.
  • if you give the wrong answer, you will receive zero points and
    the correct answer will be displayed.
  • Your score will be displayed after each question.
  • At the end of the quiz you will be asked if you want to play again.

Features

  • Display the game name and rules of the game.

  • title and rulesquiz game
  • Random selection of questions each time the game is played.

    • random questions
  • Input validation and error-checking.

    • input validation
  • Provides the player with feedback on their answer if correct or incorrect.

    • random questions
  • Calculates and displays the player's score after each question.

    • score
  • At the end of the game the player has the choice to start a new game or stop.

    • end of game

Future Features

  • Adding all the capitals of the world.
  • Improving user experience.
  • Level of difficulty.

Testing

  • Passed the code through CI PEP8 Python linter with no error.
  • Tested for invalid inputs: wrong answer, space, numbers, and more.
  • Tested the quiz in my local terminal and the Code Institute mock terminal.

Bugs

Solved Bugs

  • I had some problems with validation which I fixed.
  • Player input wasn't working properly so I fixed it with a while loop and if elif statement to check for correct validation which solves the problem.
  • All the input validation follows the same model of execution.

Remaining bugs

  • None

Validator Testing

  • Code Institute PEP8 python linter
    • No errors of syntax or indentations returned.

pep8 validation

Deployment

This project was deployed using Code Institute's mock terminal for Heroku.

  • Steps for deployment:
    • Fork or clone this repository
    • Create a new Heroku app
    • Set the config var if needed
    • Set the build packs to Python and NodeJs in that order.
    • Link the Heroku app to the repository
    • click on Deploy

Credits

  • Code Institute for the deployment terminal.
  • Code Institute for the base of the README.md
  • This website for the list of capitals by countries click here
  • I watched and learned a lot through different tutorials:
    • W3 school for the while loops and more click here
    • freecodecamp.org(20 Python projects, 12 python projects)
    • Tech With Tim(5 Python projects, oop tutorial)
    • programming with Nick
  • Python website click here
  • The book Python by Eric Matthes

Acknowledgment

A special thank you to one of the CI student Tomislav Dukez for his help in explaining concepts when I wasn't understanding them and for pushing me to improve my coding skills.

world-capitals-quiz-game's People

Contributors

amjl-16 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.