第 2 步:我们将把这个复杂的闰年问题分解成更小的步骤。是时候迈出第一步了!

Python 数学运算符%计算两个数字相除的余数或“模”

  • 并将Remainder部分拖到程序的底部。
  • calc_1a my_var这将存储验证Condition 1的一半所需的计算结果。
  • 7更改为变量year并将3更改为4 。如果结果为0 ,则年份可以被4整除!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • 提交作品
  • 下个活动
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)