📚 › Python: the friendliest first language
4. Numbers and operators
ستتم ترجمة هذا المقال تلقائيًا. يُعرض بالإنجليزية حاليًا.
Python uses + - * / for arithmetic. // is floor division, giving a whole number. % gives the remainder. ** is the power operator, so 2 ** 3 is 8.
Use parentheses to choose the order of calculation.
عرض المثال
print(7 // 2)
print(7 % 2)
print(2 ** 3)
✍️ دورك الآن
Print 2 raised to the power of 10.