Project Content
Project Content
TITLE – Menu driven program for Morse Code Conversion and Casino Game
System software
Windows 11
Python 3.12
Remove mysql
Hardware
Project synopsis
Just copy whatever is below this and remove the introduction and other heading there
The aim of the Morse Code Conversion project is to create a user-friendly Python program that
facilitates seamless conversion between English text and Morse code. This project aims to provide
a tool that allows users to input text and receive its Morse code representation or input Morse
code and receive the corresponding English text. The program should run in a loop, enabling users
to make multiple conversions until they choose to exit. This project aims to enhance understanding
and communication through the use of Morse code.
The aim of the Casino Slot Machine Game project is to develop an interactive Python game that
simulates the experience of a casino slot machine. This project aims to entertain users by providing
a simple and engaging game where they can place bets, spin the reels, and potentially win or lose
virtual currency. The game aims to offer an enjoyable experience with clear instructions, visual
representation of the slot machine, and realistic payout mechanisms. Additionally, the program
aims to handle user input gracefully, ensuring a smooth gaming experience. The overall goal is to
create a fun and interactive application that emulates the thrill of a casino slot machine.
• They can place bets (up to their current balance) or choose to quit the game.
• The slot machine has various symbols, and winning combinations result in different payouts.
• The game continues until the player decides to quit or runs out of funds.
Design work
Libraries used
Random:
• Imported for generating random numbers, specifically used in the casino game to simulate
spinning reels and determining the symbols.
CODING
while True:
print("1. Text to Morse Code")
print("2. Morse Code to Text")
choice = input("Enter your choice (1 or 2, q to quit): ")
if choice.lower() == 'q':
break
if choice == '1':
text_input = input("Enter the text to convert to Morse Code: ")
morse_code = ''
for char in text_input.upper():
if char in MORSE_CODE_DICT:
morse_code += MORSE_CODE_DICT[char] + ' '
else:
morse_code += ' '
print("Morse Code: ", morse_code)
else:
print("Invalid choice. Please enter either 1 or 2.")
def display_slot_machine(reels):
print("\n=== Slot Machine ===")
for row in reels:
print(" ".join(row))
print("===================")
def spin_reels():
symbols = ["Cherry", "Lemon", "Orange", "Plum", "Bell", "Bar", "Seven"]
return [random.choice(symbols) for _ in range(3)]
return payouts.get(common_symbol,{}).get(symbol_counts[common_symbol],
0) * bet
def display_balance(balance):
print("\nYour balance: $",balance)
def get_player_bet(balance):
while True:
try:
bet = int(input("Place your bet (0 to quit): "))
if 0 <= bet <= balance:
return bet
else:
print("Invalid bet. enter a value between 0 and your current balance.")
except ValueError:
print("Invalid input. enter a number.")
def casino_game():
balance = 1000
if bet == 0:
print("Thanks for playing! Goodbye.")
break
else:
print("Game over! You ran out of funds.")
if __name__ == "__main__":
casino_game()
else:
print('invalid choice')
output
morse code
- Develop a GUI using libraries like Tkinter or PyQt to provide a more user-friendly interface for
Morse code conversion.
2. **Audio Output:**
- Integrate sound output to represent Morse code as audio signals, allowing users to hear the code
in addition to visual representation.
- Implement a feature to automatically decode Morse code without spaces, allowing users to input
continuous Morse code strings.
4. **Text-to-Speech Integration:**
- Add a feature to convert Morse code to spoken words using text-to-speech (TTS) libraries.
- Enhance the visual appeal with graphical elements and animations. Libraries like Pygame can be
used for creating interactive and visually appealing interfaces.
2. **Multiple Paylines:**
- Implement a system with multiple paylines, giving players more chances to win and making the
game more exciting.
3. **Bonus Rounds:**
- Introduce bonus rounds or mini-games that players can access based on specific conditions or
winning combinations.
4. **Player Profiles and Persistence:**
- Implement a system to save player profiles, allowing users to track their progress and
achievements over multiple sessions.
- Enhance the audio experience with background music, sound effects, and interactive sounds
during spins and wins.
- Allow players to customize aspects such as bet amounts, the number of reels, or even the
appearance of the slot machine.
- Integrate leaderboards to encourage competition among players. Consider adding social features
for sharing achievements.
8. **Mobile Optimization:**
- Optimize the game for mobile devices, making it accessible to a broader audience.
- Implement a progressive jackpot system that grows over time as more players participate.
BIBILOGRAPHY
https://morsecode.world/international/morse2.html
https://en.wikipedia.org/wiki/Casino_game
save and send me the blank copy and then edit it with your name and class and submit it to your
teacher