UsmanGoraya commited on
Commit
6d5e87a
Β·
verified Β·
1 Parent(s): e6ae7a4

Update requirements.txt

Browse files
Files changed (1) hide show
  1. requirements.txt +1 -31
requirements.txt CHANGED
@@ -1,31 +1 @@
1
- import streamlit as st
2
- import random
3
-
4
- st.set_page_config(page_title="Rock Paper Scissors", page_icon="✌️")
5
-
6
- st.title("πŸͺ¨πŸ“„βœ‚οΈ Rock, Paper, Scissors Game")
7
-
8
- choices = ['Rock', 'Paper', 'Scissors']
9
- emojis = {'Rock': 'πŸͺ¨', 'Paper': 'πŸ“„', 'Scissors': 'βœ‚οΈ'}
10
-
11
- # Player choice
12
- player_choice = st.selectbox("Choose your move:", choices)
13
-
14
- # Play button
15
- if st.button("Play"):
16
- computer_choice = random.choice(choices)
17
-
18
- st.write(f"**You chose:** {player_choice} {emojis[player_choice]}")
19
- st.write(f"**Computer chose:** {computer_choice} {emojis[computer_choice]}")
20
-
21
- # Game logic
22
- if player_choice == computer_choice:
23
- result = "It's a draw!"
24
- elif (player_choice == 'Rock' and computer_choice == 'Scissors') or \
25
- (player_choice == 'Scissors' and computer_choice == 'Paper') or \
26
- (player_choice == 'Paper' and computer_choice == 'Rock'):
27
- result = "πŸŽ‰ You win!"
28
- else:
29
- result = "😒 You lose!"
30
-
31
- st.subheader(result)
 
1
+ streamlit