CS Ip
CS Ip
2. Toss (toss)
The player enters their name and presses enter to “toss” a
coin.
The computer randomly picks between "Heads" and "Tails."
The result is displayed and stored in the database along
with the player’s name.
3. Hangman (hangman)
The game selects a random word related to Ben 10 and
displays blanks representing the word.
The player guesses letters to reveal the word within a
limited number of guesses.
The player wins if they reveal the word before running out
of guesses; otherwise, they lose.
The final outcome (win or lose), along with the word, is
recorded in the database.
4. Set Game (set_game)
The game prompts for names of two players and asks them to
choose a mode (Ben 10, Marvel, or DC).
Based on the selected mode, a set of characters is randomly
generated for each player.
Each character set is displayed in a formatted table, and a
random winner is chosen and displayed.
The game records the player names, mode, and the winner in
the database.
Data Structures
Applying lists, dictionaries, and tuples to manage game states
and data.
Understanding how different data structures affect game
performance and organization.
User Input and Interactivity
Capturing and processing user input to make games interactive.
Validating input to handle unexpected behaviors and improve
user experience.
import mysql.connector
HARDWARE REQUIRED:
Windows 7 +
Mac OS X 10.11 or higher,64-bit
Linux: RHEL 6/7,64-BIT(almost all libraries also work
in urban)
4 GB+ RAM
5 GB+ free space
Printer for printing
SOFTWARE REQUIRED:
Operating system
Python 3.10 +
SQL 5.0+
MS Word, for preparing documentation
BIBLIOGRAPHY: