مشاركة حلول: معالجة العديد من طلبات التقديم scholarships


#41

حل جميل و نظيف ممتاز @Kareem

ملاحظة في ال while loop يمكنك جعل الكاونتر يتناقص و الاستغناء عن تعريف متغير ثان i


#42

أصلحنا المشكلة… شكراً صديقي عبد الكريم على التنبية :+1:


#43
def apply():
    age = int(age)
    
    if age < 18 and age > 0:
        print("you are too young")
    elif age <= 22 and age > 0:
        print("welcome to egypt schoolship program")
    elif age >= 23:
        print("you are to old")
    else:
        print("error: try to put a number ex:1,2,3,4.........")


apply()
apply()
apply()
apply()
apply()

#44
def apply():
   age = int(age)
    
    if age < 18 and age > 0:
        print("you are too young")
    elif age <= 22 and age > 0:
        print("welcome to egypt schoolship program")
    elif age >= 23:
        print("you are to old")
    else:
        print("error: try to put a number ex:1,2,3,4.........")


count = 0
while count <1000:
    apply()
    count = count + 1

#45

عمل رائع @AbdulMalik :+1:


#46

استاذ لماذا لا يظهر لي الأكواد التي خزنتها بواسطة Github على بيئة العمل


#47

هل بإمكانك التوضيح كيف قمت بتخزين الأكواد ؟

بيئة العمل لا تحتفظ بالأكواد لفترة طويلة :smile:


#48
def apply():
    age = input()
    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')
        
count = 0
while count < 1000:
    apply()
    count +=1

فيه مشكلة طبعا بالمسافات


#49

حللت المشكلة بتعديل الأكواد وإضافتها إلى بلوك…

عمل رائع :+1:


#50
def apply():
    age=int(input())
  
    if age < 18:
        print('You are too young')
    elif age >22:
        print('You are too old')
    else:
        print('Welcome to Egypt scholarship program')
      
x=0
while x<1000:
    apply()
    x+=1

#51

عمل رائع يا نادر :+1:


#52
def apply():
    age = input()
    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')
   
# المهمة الإضافية     
count = 0
while count < 1000:
    apply()
    count = count + 1

هل سارت الأمور بشكل جيد؟ :roll_eyes: :roll_eyes:


#53

نعم على أفضل حال سارت :smile: :+1:


#54
def apply ():
    age = input ("enter your age")
    age = int (age)

    print (age) 

    if age <18 :
         print ("You are too young")
    elif 18 <= age <= 22 :
         print ("Welcome to Egypt scholarship program")
    else:
         print ("You are too old")  

         
count=1
while count <=5:
    apply ()
    count=count+1

#55

عمل رائع يا @Alaa-Sh2018 :+1:


#56

معالجة طلبات التقديم + المهمة الاضافية

def apply():
    try:
        age = input("Enter 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("this is not a nomber")
        apply()

applicants = input("No. of applicants = ")
applicants = int(applicants)
for i in range(applicants):
    apply()

#57
def apply():
    age = int(input("Enter your age:"))
    if age == 15:
        print("You are too young")
    elif age == 20:
        print("Welcome to Jordan scholarship program")
    elif age == 25 :
        print("You are too old")
for i in range(5):
    apply()

#58
def apply():
    age = int(input("Enter your age:"))
    if age == 15:
        print("You are too young")
    elif age == 20:
        print("Welcome to Jordan scholarship program")
    elif age == 25 :
        print("You are too old")
for i in range(100):
    apply()

#59

عمل رائع نجوين… انتقلي للتالي :+1: