المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : المرحلة الجامعية تكفووووووون ساعدوني



mars300
01-04-2005, 04:07 PM
مرحبااااا

مسااااااء الخيرررر

تكفووووون ياخبراء الحاسب ساعدوني في حل هذا الشييت عجزت احله



Write a program that plays the game of hangman. Read the word to be guessed into the string WORD. The player must guess the letters belonging to WORD. The program should terminate when either all letters have been guessed correctly (player wins) or a specified number of incorrect guesses have been made (computer wins).

Hint: use the string SOLUTION to keep track of the solution so far. Initialize SOLUTION to the string of symbols ‘*’. Each time a letter in WORD is guessed, replace the corresponding ‘*’ in SOLUTION with that letter.