Python第一课Note

Note1

  1. 进入python用win+r搜cmd输python
  2. python一般用print而不用printf
  3. 离开环境(1)用exit()(2)ctrl+z一般用于代码死循环来中断
  4. 单行注释用#,多行注释用’’’    注释    ‘’’
  5. print(“我的名字是%s,我的国籍是%s”%(“小紫”,”中国”))                                                                                                                                                           如果前面有多个占位,后面可以拿一个百分号加括号,再将真实内容填入

English version

  1. If i want to enter python environment,i should use “win+r” on the keyboard,input “cmd”,then input “python” in these page.
  2. We always use “print” rather than “printf” in the python environment.
  3. When we want to go out from this environment ,we have two tips to make it.One of it is input “exit”,the other is use “ctrl+z”.
  4. When we need Single-line comment code,we should use “#” to express.

         When we need Multiple lines of comment code,we should use “ ’’’

                                                                                                         annotation to express.

                                                                                                            ’’’ ”                                        

    5.If the code of “print” has multiple placeholder,the second half of the code need to use “%()” to express.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值