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! این اسکریپت پایتون یک بازی سرگرمکننده و آموزشی است که در آن بازیکنان به یک سری سوالات مسابقه پاسخ میدهند. بازی امتیاز بازیکن را دنبال کرده و بازخوردی در مورد هر پاسخ ارائه میدهد.
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.
To run the quiz_game.py
script, follow the instructions below for different environments.
-
Open Command Prompt:
- Press
Win + R
, typecmd
, and press Enter.
- Press
-
Navigate to the Directory:
- Use the
cd
command to change to the directory containingquiz_game.py
. For example:cd path\to\your\python-repository\Quiz-Game
- Use the
-
Run the Script:
- Execute the script using Python:
python quiz_game.py
- Ensure Python is installed and added to your system's PATH.
- Execute the script using Python:
-
Open Terminal:
- Find Terminal in your Applications folder (macOS) or search for it (Linux).
-
Navigate to the Directory:
- Use the
cd
command to change to the directory containingquiz_game.py
. For example:cd path/to/your/python-repository/Quiz-Game
- Use the
-
Run the Script:
- Execute the script using Python:
python3 quiz_game.py
- Ensure Python 3 is installed and accessible from your PATH.
- Execute the script using Python:
-
Open PyCharm:
- Launch the PyCharm IDE.
-
Open the Project:
- Go to
File
>Open
and select theQuiz-Game
directory.
- Go to
-
Locate the Script:
- In the Project Explorer pane on the left, find and click on
quiz_game.py
.
- In the Project Explorer pane on the left, find and click on
-
Run the Script:
- Right-click on
quiz_game.py
and selectRun 'quiz_game'
. - The output will appear in the Run tool window at the bottom.
- Right-click on
-
Open Visual Studio Code:
- Launch VSCode.
-
Open the Folder:
- Go to
File
>Open Folder
and select theQuiz-Game
directory.
- Go to
-
Open the Script:
- In the Explorer pane on the left, click on
quiz_game.py
to open it in the editor.
- In the Explorer pane on the left, click on
-
Run the Script:
- Via Terminal:
- Open a new terminal in VSCode by going to
Terminal
>New Terminal
, then run:python quiz_game.py
- Open a new terminal in VSCode by going to
- 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.
- Via Terminal:
- 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.
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
For any questions or feedback, please contact me at hamedgharghi1@gmail.com.
این پروژه شامل یک اسکریپت پایتون است که یک بازی آزمون را پیادهسازی میکند. بازی یک سری سوالات چندگزینهای را میپرسد و امتیاز کاربر را بر اساس پاسخهایشان دنبال میکند. بازخوردی در مورد اینکه هر پاسخ صحیح است یا نادرست ارائه میدهد و در پایان امتیاز نهایی را نمایش میدهد.
برای اجرای اسکریپت quiz_game.py
، مراحل زیر را برای محیطهای مختلف دنبال کنید.
-
باز کردن Command Prompt:
- کلیدهای
Win + R
را فشار دهید،cmd
را تایپ کنید و Enter را بزنید.
- کلیدهای
-
رفتن به دایرکتوری:
- از دستور
cd
برای تغییر به دایرکتوری حاویquiz_game.py
استفاده کنید. برای مثال:cd path\to\your\python-repository\Quiz-Game
- از دستور
-
اجرای اسکریپت:
- اسکریپت را با استفاده از Python اجرا کنید:
python quiz_game.py
- اطمینان حاصل کنید که Python نصب شده و به PATH سیستم شما اضافه شده است.
- اسکریپت را با استفاده از Python اجرا کنید:
-
باز کردن Terminal:
- Terminal را در پوشه Applications (macOS) پیدا کنید یا جستجو کنید (Linux).
-
رفتن به دایرکتوری:
- از دستور
cd
برای تغییر به دایرکتوری حاویquiz_game.py
استفاده کنید. برای مثال:cd path/to/your/python-repository/Quiz-Game
- از دستور
-
اجرای اسکریپت:
- اسکریپت را با استفاده از Python اجرا کنید:
python3 quiz_game.py
- اطمینان حاصل کنید که Python 3 نصب شده و از PATH شما قابل دسترسی است.
- اسکریپت را با استفاده از Python اجرا کنید:
-
باز کردن PyCharm:
- IDE PyCharm را راهاندازی کنید.
-
باز کردن پروژه:
- به
File
>Open
بروید و دایرکتوریQuiz-Game
را انتخاب کنید.
- به
-
یافتن اسکریپت:
- در پنل Project Explorer در سمت چپ، روی
quiz_game.py
کلیک کنید.
- در پنل Project Explorer در سمت چپ، روی
-
اجرای اسکریپت:
- روی
quiz_game.py
کلیک راست کرده و گزینهRun 'quiz_game'
را انتخاب کنید. - خروجی در پنجره Run در پایین ظاهر خواهد شد.
- روی
-
باز کردن Visual Studio Code:
- VSCode را راهاندازی کنید.
-
باز کردن پوشه:
- به
File
>Open Folder
بروید و دایرکتوریQuiz-Game
را انتخاب کنید.
- به
-
باز کردن اسکریپت:
- در پنل Explorer در سمت چپ، روی
quiz_game.py
کلیک کنید تا در ویرایشگر باز شود.
- در پنل Explorer در سمت چپ، روی
-
اجرای اسکریپت:
- از طریق Terminal:
- یک ترمینال جدید در VSCode باز کنید با رفتن به
Terminal
>New Terminal
و سپس اجرا کنید:python quiz_game.py
- یک ترمینال جدید در VSCode باز کنید با رفتن به
- از طریق دکمه Play:
- اگر افزونه Python را نصب کردهاید، میتوانید روی دکمه سبز Play در گوشه بالا سمت راست ویرایشگر کلیک کنید تا اسکریپت را اجرا کنید.
- از طریق Terminal:
- 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.