菜鸟教程 -- 学的不仅是技术,更是梦想!

Python 基础教程
(追記) (追記ここまで)

Python 练习实例34

Python 100例 Python 100例

题目:练习函数调用。

程序分析:使用函数,输出三次 RUNOOB 字符串。

实例

#!/usr/bin/python# -*- coding: UTF-8 -*-defhello_runoob(): print('RUNOOB')defhello_runoobs(): foriinrange(3): hello_runoob()if__name__ == '__main__': hello_runoobs()

以上实例输出结果为:

RUNOOB
RUNOOB
RUNOOB

Python 100例 Python 100例

AI 思考中...

点我分享笔记

  • 昵称 (必填)
  • 邮箱 (必填)
  • 引用地址

AltStyle によって変換されたページ (->オリジナル) /