Skip to content

Commit c588ff1

Browse files
committed
nothing special right now
1 parent 9a4a78f commit c588ff1

File tree

1 file changed

+6
-5
lines changed
  • Project 2 - Word Guessing Game

1 file changed

+6
-5
lines changed

Diff for: Project 2 - Word Guessing Game/main.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import random
22

3-
userName = input("Please Enter Your Name : ")
4-
print(f'Welcome Mr. {userName}')
3+
def display_words(secret_words, guessed_words):
4+
for word in secret_words:
5+
if word in guessed_words:
6+
print(word, end=" ")
7+
else:
8+
print("_", end=" ")
59

6-
words = ['rainbow', 'butterfly', 'windows', 'programming', 'python', 'geekforgeeks', 'mathematics', 'amazing', 'alon']
710

8-
word = random.choice(words)
9-
print(word)

0 commit comments

Comments
 (0)