Skip to content

Latest commit

 

History

History

Quiz-Game

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Quiz Game

Python Game

Welcome to the Quiz Game project! This Python script is a fun and educational game where players answer a series of quiz questions. The game keeps track of the player's score and provides feedback on each answer.

خوش آمدید به پروژه Quiz Game! این اسکریپت پایتون یک بازی سرگرم‌کننده و آموزشی است که در آن بازیکنان به یک سری سوالات مسابقه پاسخ می‌دهند. بازی امتیاز بازیکن را دنبال کرده و بازخوردی در مورد هر پاسخ ارائه می‌دهد.

Navigation

English Version

Overview

This project contains a Python script that implements a quiz game. The game asks a series of multiple-choice questions and keeps track of the user's score based on their answers. It provides feedback on whether each answer is correct or incorrect and shows the final score at the end.

How to Use

To run the quiz_game.py script, follow the instructions below for different environments.

Running on Windows 🖥️

  1. Open Command Prompt:

    • Press Win + R, type cmd, and press Enter.
  2. Navigate to the Directory:

    • Use the cd command to change to the directory containing quiz_game.py. For example:
      cd path\to\your\python-repository\Quiz-Game
  3. Run the Script:

    • Execute the script using Python:
      python quiz_game.py
    • Ensure Python is installed and added to your system's PATH.

Running on macOS/Linux 🖥️

  1. Open Terminal:

    • Find Terminal in your Applications folder (macOS) or search for it (Linux).
  2. Navigate to the Directory:

    • Use the cd command to change to the directory containing quiz_game.py. For example:
      cd path/to/your/python-repository/Quiz-Game
  3. Run the Script:

    • Execute the script using Python:
      python3 quiz_game.py
    • Ensure Python 3 is installed and accessible from your PATH.

Using PyCharm 🧑‍💻

  1. Open PyCharm:

    • Launch the PyCharm IDE.
  2. Open the Project:

    • Go to File > Open and select the Quiz-Game directory.
  3. Locate the Script:

    • In the Project Explorer pane on the left, find and click on quiz_game.py.
  4. Run the Script:

    • Right-click on quiz_game.py and select Run 'quiz_game'.
    • The output will appear in the Run tool window at the bottom.

Using Visual Studio Code (VSCode) 🧑‍💻

  1. Open Visual Studio Code:

    • Launch VSCode.
  2. Open the Folder:

    • Go to File > Open Folder and select the Quiz-Game directory.
  3. Open the Script:

    • In the Explorer pane on the left, click on quiz_game.py to open it in the editor.
  4. Run the Script:

    • Via Terminal:
      • Open a new terminal in VSCode by going to Terminal > New Terminal, then run:
        python quiz_game.py
    • Via Play Button:
      • If you have the Python extension installed, you can click the green play button in the top right corner of the editor to run the script.

Requirements

  • Python 3.x: Ensure Python 3.x is installed on your system.
  • IDE/Text Editor: PyCharm or VSCode is recommended for a better development experience.

Repository Topics

Add relevant topics to help others find this project:

  • python
  • beginner
  • python3
  • programming
  • beginner-python
  • quiz-game
  • educational-game
  • python-game
  • coding-example
  • programming-basics
  • python-tutorial

Contact

For any questions or feedback, please contact me at hamedgharghi1@gmail.com.


نسخه فارسی

مروری بر پروژه

این پروژه شامل یک اسکریپت پایتون است که یک بازی آزمون را پیاده‌سازی می‌کند. بازی یک سری سوالات چندگزینه‌ای را می‌پرسد و امتیاز کاربر را بر اساس پاسخ‌هایشان دنبال می‌کند. بازخوردی در مورد اینکه هر پاسخ صحیح است یا نادرست ارائه می‌دهد و در پایان امتیاز نهایی را نمایش می‌دهد.

نحوه استفاده

برای اجرای اسکریپت quiz_game.py، مراحل زیر را برای محیط‌های مختلف دنبال کنید.

اجرای اسکریپت در ویندوز 🖥️

  1. باز کردن Command Prompt:

    • کلیدهای Win + R را فشار دهید، cmd را تایپ کنید و Enter را بزنید.
  2. رفتن به دایرکتوری:

    • از دستور cd برای تغییر به دایرکتوری حاوی quiz_game.py استفاده کنید. برای مثال:
      cd path\to\your\python-repository\Quiz-Game
  3. اجرای اسکریپت:

    • اسکریپت را با استفاده از Python اجرا کنید:
      python quiz_game.py
    • اطمینان حاصل کنید که Python نصب شده و به PATH سیستم شما اضافه شده است.

اجرای اسکریپت در macOS/Linux 🖥️

  1. باز کردن Terminal:

    • Terminal را در پوشه Applications (macOS) پیدا کنید یا جستجو کنید (Linux).
  2. رفتن به دایرکتوری:

    • از دستور cd برای تغییر به دایرکتوری حاوی quiz_game.py استفاده کنید. برای مثال:
      cd path/to/your/python-repository/Quiz-Game
  3. اجرای اسکریپت:

    • اسکریپت را با استفاده از Python اجرا کنید:
      python3 quiz_game.py
    • اطمینان حاصل کنید که Python 3 نصب شده و از PATH شما قابل دسترسی است.

استفاده از PyCharm 🧑‍💻

  1. باز کردن PyCharm:

    • IDE PyCharm را راه‌اندازی کنید.
  2. باز کردن پروژه:

    • به File > Open بروید و دایرکتوری Quiz-Game را انتخاب کنید.
  3. یافتن اسکریپت:

    • در پنل Project Explorer در سمت چپ، روی quiz_game.py کلیک کنید.
  4. اجرای اسکریپت:

    • روی quiz_game.py کلیک راست کرده و گزینه Run 'quiz_game' را انتخاب کنید.
    • خروجی در پنجره Run در پایین ظاهر خواهد شد.

استفاده از Visual Studio Code (VSCode) 🧑‍💻

  1. باز کردن Visual Studio Code:

    • VSCode را راه‌اندازی کنید.
  2. باز کردن پوشه:

    • به File > Open Folder بروید و دایرکتوری Quiz-Game را انتخاب کنید.
  3. باز کردن اسکریپت:

    • در پنل Explorer در سمت چپ، روی quiz_game.py کلیک کنید تا در ویرایشگر باز شود.
  4. اجرای اسکریپت:

    • از طریق Terminal:
      • یک ترمینال جدید در VSCode باز کنید با رفتن به Terminal > New Terminal و سپس اجرا کنید:
        python quiz_game.py
    • از طریق دکمه Play:
      • اگر افزونه Python را نصب کرده‌اید، می‌توانید روی دکمه سبز Play در گوشه بالا سمت راست ویرایشگر کلیک کنید تا اسکریپت را اجرا کنید.

نیازمندی‌ها

  • Python 3.x: اطمینان حاصل کنید که Python 3.x روی سیستم شما نصب شده است.
  • IDE/ویرایشگر متنی: PyCharm یا VSCode برای تجربه بهتر توسعه توصیه می‌شود.

برچسب‌های مخزن

برچسب‌های مربوطه را اضافه کنید تا به دیگران کمک کند این پروژه را پیدا کنند:

  • python
  • beginner
  • python3
  • programming
  • beginner-python
  • quiz-game
  • educational-game
  • python-game
  • coding-example
  • programming-basics
  • python-tutorial

تماس

برای هرگونه سوال یا بازخورد، لطفاً با من تماس بگیرید به hamedgharghi1@gmail.com.