用户交互和注释

用户交互

  • 等待用户操作后再执行程序

    示例

  • name = input ("what's your name")
    print("hello" , name)
    name = input("what's your name?")
  • age = input("How old are you?")
    hometown = input("Where is your hometown?")
    print("hello", name , "you are ",age," years old, you came from", hometown)

    代码注释用#,可以中文也可以英文

猜你喜欢

转载自www.cnblogs.com/dzycqj/p/9103036.html
今日推荐