حل جميل و نظيف ممتاز @Kareem
ملاحظة في ال while loop يمكنك جعل الكاونتر يتناقص و الاستغناء عن تعريف متغير ثان i
حل جميل و نظيف ممتاز @Kareem
ملاحظة في ال while loop يمكنك جعل الكاونتر يتناقص و الاستغناء عن تعريف متغير ثان i
أصلحنا المشكلة… شكراً صديقي عبد الكريم على التنبية
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()
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
استاذ لماذا لا يظهر لي الأكواد التي خزنتها بواسطة Github على بيئة العمل
هل بإمكانك التوضيح كيف قمت بتخزين الأكواد ؟
بيئة العمل لا تحتفظ بالأكواد لفترة طويلة
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
فيه مشكلة طبعا بالمسافات
حللت المشكلة بتعديل الأكواد وإضافتها إلى بلوك…
عمل رائع
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
عمل رائع يا نادر
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
هل سارت الأمور بشكل جيد؟
نعم على أفضل حال سارت
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
معالجة طلبات التقديم + المهمة الاضافية
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()
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()
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()
عمل رائع نجوين… انتقلي للتالي
5 المشاركات التي انقسمت الي موضوع جديد: %{topic_link]