EXTEND:我们只需要告诉用户它是否是闰年。如果不是闰年,让我们也告诉他们为什么!

  • 注释掉不需要print()改进输出,如下所示: print( year , "is not a leap year." )
  • 在任一 else 块中,在print( year , · "is · not · a · leap · year." )添加三个if语句
  • 使用一个if检查condition_1a是否为F alse ,一个检查condition_1b是否为False ,一个检查condition2 。在每个 if 块中包含一个print()以让用户知道哪些条件是False

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)