重新编码 1:让我们创建一个包含我们已经完成的所有步骤的大型条件。代码看起来很熟悉!
- 从, 拖出if到程序的底部。确保它没有缩进!
- 替换条件选择· == · "yes" : with ( year % 4 == 0 and year % 100 != 0 ):
- 此条件同时代表condition_1a和condition_1b !确保包括括号。
- 从,将Print String拖入if -block 并将其更改为"That is a leap year!"
To navigate the page using the TAB key, first press ESC to exit the code editor.