
运行结果:
- def weather(): # 定义无参函数weather
- print("*"*13) # 输出13个星号
- print("日期:3月20日") # 输出日期
- print("温度:1~14度") # 输出温度
- print("*"*13) # 输出13个星号
- weather() # 调用weather()函数
*************
日期:3月29日
温度:1~14度
*************
运行结果:
- def weather(): # 定义无参函数weather
- print("*"*13) # 输出13个星号
- print("日期:3月20日") # 输出日期
- print("温度:1~14度") # 输出温度
- print("*"*13) # 输出13个星号
- weather() # 调用weather()函数
Scratch3.0 全国青少年软件编程等级考试 Python Scratch图形化一级 Scratch图形化四级 Scratch图形化三级 Scratch图形化二级 电子学会