1. 函数
    • 函数带名字的代码块,用于完成具体工作。
    • def  函数名(形参1,形参2): 函数体
    • #user_name 是形参
      def greet_user(user_name):
          """显示简单的问题语"""
          print("Hello:"+user_name.title()+"!")
          
      #juice是实参    
      greet_user("juice")
      View Code

相关文章:

  • 2021-06-20
  • 2021-09-01
  • 2022-12-23
  • 2021-11-02
  • 2022-12-23
  • 2021-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-02
  • 2021-07-27
  • 2022-12-23
  • 2021-05-31
  • 2021-11-07
  • 2021-11-19
  • 2022-01-22
相关资源
相似解决方案