Skip to content · ⁨الانتقال إلى المحتوى⁩

Add up one to five · ⁨اجمع من واحد إلى خمسة⁩

English

Add up one to five

Use a for loop to add 1 + 2 + 3 + 4 + 5 into total.

range(1, 6) gives 1 to 5: it starts at the first number and stops before the second. Add each one onto a total that starts at 0.

العربية

اجمع من واحد إلى خمسة

استخدم حلقة for لجمع 1 + 2 + 3 + 4 + 5 في total.

range(1, 6) تمنح 1 لـ 5: تبدأ من الرقم الأول وتتوقف قبل الثاني. أضف كل واحد إلى المجموع الذي يبدأ من 0.

Log in or create account · ⁨تسجيل الدخول أو إنشاء حساب⁩

IGCSE, A-Level & AP