>>> 1.25 % 0.5
0.25
% มัน stands for อะไรหรอคะ งง
ตอบว่า 0.5 เป็น กี่เปอเซนของ 1.25 ก็ไม่ใช่
เรางงๆค่ะ
นี่คือตัวเต็ม
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้To determine the quotient and remainder of a division, use the floor division and modulo operators, respectively.
Floor division is done using two forward slashes.
The modulo operator is carried out with a percent symbol (%).
These operators can be used with both floats and integers.
This code shows that 6 goes into 20 three times, and the remainder when 1.25 is divided by 0.5 is 0.25.>>> 20 // 6
3
>>> 1.25 % 0.5
0.25
อันแรกเราไม่งงค่ะ มางง quotient กับ modulo
สอบถามค่า Python
0.25
% มัน stands for อะไรหรอคะ งง
ตอบว่า 0.5 เป็น กี่เปอเซนของ 1.25 ก็ไม่ใช่
เรางงๆค่ะ
นี่คือตัวเต็ม
[Spoil] คลิกเพื่อดูข้อความที่ซ่อนไว้