Skip to content

sakshi-0009/Quiz-Game-with-Python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Quiz-Game-with-Python

Project : Quiz Game with Python

We don’t need any package or module for this task as I will only use the basic python for building this quiz.

Let's go through program step by step:

  1. While thinking about a quiz, the first thing that comes in mind is options, now as a python programmer, I will build a function so that we can easily give the options as parameters while defining every new question. By defining the function for giving options it will save a lot of code in the process. So every time a problem hits you make a solution in your mind and then try to code as less as possible. This will build your ability to build algorithms.

  2. Pass a print statement to welcome us in the quiz game and I will take a user input that whether the user is ready or not. Then I will set the initial score as 0, and set the total number of questions as 4.

  3. As the questions are already in my mind so I will first create a list of correct answers so that we can verify the correct answers in the process of the quiz game by using the list indexing method in Python.

  4. I will simply start with building questions for our quiz game, after defining every question I will use the function that I defined at the beginning to give the three options for the question.

  5. After every answer whether correct or incorrect the user will be passed to the next question.

  6. Now as we are done with the questions it’s time to show the scores to the user. I will multiply the score with 10 and then I will pass the if-else conditionals to print the status of the result of this Quiz game.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages