import streamlit as st import random st.set_page_config(page_title="Rock Paper Scissors", page_icon="✌️") st.title("🪨📄✂️ Rock, Paper, Scissors Game") choices = ['Rock', 'Paper', 'Scissors'] emojis = {'Rock': '🪨', 'Paper': '📄', 'Scissors': '✂️'} # Player choice player_choice = st.selectbox("Choose your move:", choices) # Play button if st.button("Play"): computer_choice = random.choice(choices) st.write(f"**You chose:** {player_choice} {emojis[player_choice]}") st.write(f"**Computer chose:** {computer_choice} {emojis[computer_choice]}") # Game logic if player_choice == computer_choice: result = "It's a draw!" elif (player_choice == 'Rock' and computer_choice == 'Scissors') or \ (player_choice == 'Scissors' and computer_choice == 'Paper') or \ (player_choice == 'Paper' and computer_choice == 'Rock'): result = "🎉 You win!" else: result = "😢 You lose!" st.subheader(result)