3rd Semester Python Programming Language Project
-By Aman Sharma
INTRODUCTION:
Truth And Dare is adaption of the conventional game of Truth and Dare played among friends in which a player is chosen and given options to either tell a truth or complete a dare.
We used tkinter Library of Python to create the game's GUI, and for storing the player's information we used MySQL with the help of "pymysql" library. The game is created to work on a local machine, hence there is requirement for a localhost (in our case, we use XAMPP Server).
Python's various features such as classes, functions, importing other .py files etc. are used profoundly. We used PyCharm Community Edition as the IDE for this project.
The sole purpose of this Project is for entertainment purpose, to play with friends and have a jolly time.
OBJECTIVES:
-
Truth And Dare Game Project is created for entertainment and educational purpose.
-
To learn Python Programming Language and it's features.
-
To learn to use tkinter library.
-
To learn connectivity of database in python using "pymysql" library.
-
Application and Implementation of programming concepts using python.
HOW TO USE/INSTRUCTIONS:
Truth And Dare Game is similar to the real life Truth And Dare Game.
NOTE: We need to make sure that the machine is connected to a localhost before launching the application as it is a localhost based project using database.
Layout Description-
- Screen is divided into three sections, namely- Player Console, Game Console and Scoreboard.
- Player Console: It is present mostly in the left-middle section of the window.
- It contains the information about the Player who is supposed to play i.e., Name of the player who's turn it is.
- Under the Player Name the Dares and Truths (as chosen) will be displayed.
- There are two buttons for choosing between Dare and Truth options. By clicking on either the question will be generated.
- Under the TRUTH and DARE buttons there are two other buttons which specify the task's activity i.e., whether it is completed or forfeited.
- Game Console: It is present on the right side of the window.
- Round Number
- It contains 5 buttons. 1. Add Truth: To add truth question into the game data. 2. Add Dare: To add dare question into the game data. 3. Add Player: To add Player information into the database. 4. Delete Player: To delete a player from the database. 5. Close: To close the Game window.
- Scoreboard: It is present in the right-bottom side of the window.
- It contains the name of the player's playing and their score in a tabular form of all the players.
TECHNOLOGIES USED:
- Language Used-
Python Ver-3.7.0
- IDE USED-
PyCharm 2019.1.3 (Community Edition)
Build #PC-191.7479.30, built on May 29, 2019
JRE: 11.0.2+9-b159.60 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
-
Libraries Used-
-
_a._Tkinter-Tkinter is a Python binding to the Tk GUI toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's de facto standard GUI.
-
b. Pymysql- PyMySQL is an interface for connecting to a MySQL database server from Python. It implements the Python Database API v2.0 and contains a pure-Python MySQL client library. The goal of PyMySQL is to be a drop-in replacement for MySQLdb.
REFERENCES: