بسم الله اولا ادعى ربنا إن الاختيار العشوائى ميكونش انت عشان ساعتها هتفلس
print ("welcome to 'whose wallet?' ")
print("you will give me a list of names, and I will pick a person to pay")
names =input ("If you 're ready, entre the names separated by a comma :\n")
ask = names . split (",")
number=len (ask)
import random
ran = random.randint(0,number-1)
print(f"please ask {(ask[ran])} to take his wallet.Dinner is on him")
اذا اردت ان الكود ما يطلعش اسمك فى اكثر من طريقه وهذه طريقتى :
print ("welcome to 'whose wallet?' ")
print("you will give me a list of names, and I will pick a person to pay")
names =input ("If you 're ready, entre the names separated by a comma :\n")
ask = names . split (",")
number=len (ask)
import random
ran = random.randint(1,number-1)
print(f"please ask {(ask[ran])} to take his wallet.Dinner is on him")
كل اللى انا سويته هو انى عدلت السطر قبل الاخير وجعلته يختار شخصا عشوائيا ما عدا اول شخص لذلك يجب عليك ان تكتب اسمك اول شخص