Grade letter · حرف الدرجة
Grade letter
mark is 72. Print A for 80 and above, B for 70 to 79, C for 60 to 69, and D below that.
Order matters. Because Python stops at the first true test, checking >= 60 first would give C to every good mark. Start at the top and work down.
حرف الدرجة
mark هو 72. اطبع A لـ 80 وما فوق، B لـ 70 إلى 79، C لـ 60 إلى 69، وD أقل من ذلك.
الترتيب مهم. لأن بايثون يتوقف عند أول اختبار صحيح، فإن التحقق من >= 60 أولاً سيعطي C لكل درجة جيدة. ابدأ من الأعلى وعمل للأسفل.
mark is 72. Print A for 80 and above, B for 70 to 79, C for 60 to 69, and D below that. · mark هو 72. اطبع A لـ 80 وما فوق، B لـ 70 إلى 79، C لـ 60 إلى 69، وD أقل من ذلك.
Click Run to see the output here. · اضغط تشغيل لرؤية المخرجات هنا.