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

Add two numbers you were given · ⁨اجمع عددين مُعطيين⁩

English

Add two numbers you were given

Read two whole numbers, one per line, and print their total. For 3 and 4, print 7.

Two reads, two int(...), then one +. Forget one int and you get 34 instead of 7 — Python joined the text rather than adding the numbers.

العربية

أضف رقمين مُعطَين لك

اقرأ رقمين صحيحين، واحد لكل سطر، وطبع مجموعهما. للرقمين 3 و 4، اطبع 7.

قراءتان، اثنتان int(...)، ثم واحدة +. نسيان int واحد سيمنحك 34 بدلاً من 7 — بايثون ملأت النص بدلاً من جمع الأرقام.

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

IGCSE, A-Level & AP