الفريق العربي للبرمجةأرشيف المنتديات · 2000 – 2023
نسخة أرشيفية للقراءة فقط — التسجيل والمشاركة مغلقان، والمحتوى محفوظ كما كان.

[مخالف - طلب حل : ]ساعدوني ....hangman

مغلق
بدأه جروح في 29 مايو 2010 · 1 رد · 483 مشاهدة · في لغة Python
مشاركة: واتساب X فيسبوك تيليجرام
#1 صاحب الموضوع

هلا أخواني و أخواتي..

عندي تسليم بروجيكت بكرة ..مش عارفة اعمله :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)

#2

الأخ الكريم/الأخت الكريمة

السلام عليكم ورحمة الله وبركاته.

مرحباً بكم في منتدى الفريق العربي للبرمجة

تأسف إدارة المنتدى لغلق الموضوع وذلك لمخالفته قوانين المشاركات، فقرة طلب حل الواجبات والتمارين.

قواعد طرح المشاركات

/index.php?showtopic=29343

شاكرين لكم حُسن تعاونكم

Do as I say, not as I do

We are Anonymous. We are Legion. We don't forgive. We don't forget

هذا الموضوع مغلق.

مواضيع مشابهة