هلا أخواني و أخواتي..
عندي تسليم بروجيكت بكرة ..مش عارفة اعمله :wacko:
الله يخليكم ساعدوني ..
This program lets you guess 4 of the letters in a word and then gives you the word that you were trying to guess.
Requirements:
1- You’ll have to import the module ‘random’ in order to use the function random.choice() to randomly choose a word from a list for the user to guess
2- You’ll have to use some lists that contain words according to their categories
sports=[“football”, “basketball”, “hockey”, “baseball”, “ping pong” ]
names=[“Celine”, “Sarah”, “Jeanine”, “Claudia”, “Jennifer”, “Michelle”]
subjects=[“Programming”, “Design”, “Analysis”, “Web development”, “Database”, “Artificial intelligence”]
3- The following should be the output of your program (User’s entry will be denoted in #### )
Please choose among these categories '1 for sports, 2 for names, 3 for subjects' #
Guess the Word!
You get to give five letters.
There are 7 letters in the word. 7 is generated according to the length of the random word chosen using the function len()
Enter a letter: #
You have 4 guesses left.
Enter a letter: #
You have 3 guesses left.
Enter a letter: #
You have 2 guesses left.
Enter a letter: #
You have 1 guesses left.
Enter a letter: #
You have 0 guesses left.
The word:
**a*d*a
Guess the word: #####
Congratulations, Claudia is the word! # or it would be “sorry, the right answer is Claudia”, if the user has got the wrong answer
4- Make sure to handle all cases (example Wrong entries)