Python
youyouran12314
若你决定灿烂,山无遮、海无拦。
展开
-
Pycharm去除波浪线
Pycharm环境下显示 在代码中显示许多波浪线,查看详情显示Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click。意思:拼写检查器检查有助于定位错别字和拼写错误的代码、注释和文字,并把它们定位在原创 2017-08-30 17:39:19 · 5640 阅读 · 0 评论 -
Pycharm选择性忽略PEP8代码风格警告信息
在使用Pycharm时,定位波浪线时,提示“PEP 8:inline comment should start with '#” ,提示要求我们按照PEP8代码风格编写,不然会有警告信息。如下图: 警告解除方法 方式一:按照PEP8要求规范代码 方式二:将鼠标定位到警告处,按Alt+Enter键,选择“lgnore errors like this”,即忽略这样的错误 方式三:设置原创 2017-08-31 10:46:07 · 1634 阅读 · 0 评论 -
Python小程序,看你是否偏重
# -*- coding:utf-8 -*- name=raw_input('请输入姓名:') weight = float(input('请输入体重: ')) height = float(input('请输入身高: ')) BMI=weight/height/height if BMI<18.5: print name,',你过轻' elif 18.5<=BMI<25: pri原创 2017-09-19 16:22:58 · 458 阅读 · 0 评论