Add two numbers you were given · הוסף שני מספרים שקיבלת
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 — Python איחה את הטקסט במקום לחבר את המספרים.
Read two whole numbers, one per line, and print their total. For 3 and 4, print 7. · קרא שני מספרים שלמים, אחד בשורה, והדפס את סכומם. עבור 3 ו-4, הדפס 7.
Click Run to see the output here. · לחץ על הרץ כדי לראות את התוצא כאן.