مرحباً جميعاً
المهمة المطلوبة
بإمكانك الإطلاع على المهمة المطلوبة من هنا
كيفية كتابة الأكواد في المنتدى
- إذا كان لديك كيبورد فرنسي, اضغط على alt gr و 7 لكتابة الرمز `
بإمكانك الإطلاع على المهمة المطلوبة من هنا
مهندس لقد قمت بالتعديل على الكود السابق غيرت اسم الدالة واستدعيتها خمس مرات
def apply():
try:
age = input("Enter your age:")
age = int(age)
if age < 18:
print("You are too young")
elif age <= 22:
print("Welcome to Jordan scholarship program")
else:
print("You are too old")
except ValueError:
apply()
apply()
apply()
apply()
apply()
apply()
ما شاء الله عليك يا يحيى… عمل ممتاز خلال أربع دقائق, وقت قياسي
شكراً لك مهندس ياسر
مهمة معالجة العديد من طلبات التقديم
@yahya-alshammout شكرا لك لقد استفدت منك كثيرا:
def apply():
try:
age = input("your age:" )
age =int(age)
if age < 18:
print("You are too young")
elif age > 22:
print("You are too old")
else :
print("Welcome to Egypt scholarship program")
except ValueError:
print("Enter your age in numbers ex: 1,2,3...")
apply()
apply()
apply()
apply()
apply()
apply()
عفواً الاهم هو انك عرفت كيف تستخدم except and try
هذا حل المهمة الاضافية
def apply():
try:
age = input("Enter your age:")
age = int(age)
if age < 18:
print("You are too young")
elif age <= 22:
print("Welcome to Jordan scholarship program")
else:
print("You are too old")
except ValueError:
apply()
for i in range(0,1000):
apply()
جميل جداً يا عثمان… أتقنت الأمور بسرعة
رائع يا يحيى… ما رأيك بعمل مسافة سطر إضافي بين الدالة والحلقة
شكراً لك على هذه النصائح مهندس
سأفغل ذلك
هذا حل المهمة الاضافية
def apply():
try:
age = input("your age:" )
age =int(age)
if age < 18:
print("You are too young")
elif age > 22:
print("You are too old")
else :
print("Welcome to Egypt scholarship program")
except ValueError:
print("Enter your age in numbers ex: 1,2,3...")
apply()
count = 0
while count < 1000:
apply()
count += 1
# for تكرار بواسطة
#for i in range(0,1000):
#apply()
السلام عليكم ورحمة الله وبركاته
دي الدالة
def apply():
age = input("Please, Enter your age?")
age =int (age)
if age <18:
print("Sorry, You are too young!")
elif age >22:
print("Opps, You are too old!!!")
else:
print ("Welcome to Egypt scolarship program....")
apply()
apply()
apply()
apply()
apply()
ودي المهمة الاضافية
def apply():
age = input("Please, Enter your age?")
age =int (age)
if age <18:
print("Sorry, You are too young!")
elif age >22:
print("Opps, You are too old!!!")
else:
print ("Welcome to Egypt scolarship program....")
apply()
increase = 0
while increase < 1000 :
apply()
increase = increase +1
هل قمتي بتجربة الكود قبل نشره هنا؟
بالعبارات الشرطية ماذا تقصدين ب gt& و lt&
حتى انا جربت الكود ولم يعمل لقد وجدت هدا الشرح عن gt& و lt& ولم افهمه جيدا.
انها تستعمل اكواد HTML