empNum = 0 salarySum = 0 salarys = [] while True: s = input("请输入员工薪资(按Q或q结束)") if s.upper() =="Q": print("录入结束,退出") if float(s) < 0: continue empNum += 1 salarys.append(float(s)) salarySum += float(s) print(float(s)) print("员工数{0}".format(empNum)) print("录入薪资:",salarys) print("平均薪资{0}".format(salarySum/empNum))
Traceback (most recent call last): File "D:/python_py/mypy17.py", line 9, in <module> if float(s) < 0: ValueError: could not convert string to float: 'q'
老师,这个错误是为什么,为什么不能转为浮点数? 而且为什么要float(s)<0
老师,还是没看出来哪里不同了。。。正常访问不都是这样访问吗?ip哪里不一样??
老师那个环境变量配置我不太懂,我原先用的pycharm是社区版的,现在用那个专业版对之前的有影响么
老师,我也出现了连接不上的报错,和上面同学一样,cmd可以PING上,网络配置
老师这个append添加是只能在列表的末尾添加吗?如果我在b[1]中添加9它就会报错。还有浅拷贝里面为什么会有30和9这两个数
哪里错了
老师,验证了一下好像关闭的时候会自动保存欸
老师既然wtf与restful都可以进行验证,开发的时候哪个最常用呀
老师,这里面的script为什么不能只写成一个,而要写两个
老师为什么我这边输入的密码和数据库设置的密码一样但是一直跳转到登录页面没有跳转到main.jsp页面呢
z这是啥问题呀
回复楼上,@王浩信,老师写错了它口头说的24是对的,12 << 1 肯定就是24啊,只不过它写的时候写错了。因为后面要用到newThr,7:24时老师再次说了newThr为24。
老师 properties 文件只能创建在src下
我发现创建在 com.bjsxt包下面读不到
老师,请问一下这个一章节的内容可以用pycharm 练习吗?还是必须用Jupyter Notebook ?
Failure to find com.bjsxt:service:pom:1.0-SNAPSHOT in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus-aliyun has elapsed or updates are forced[WARNING] The POM for com.bjsxt:service:jar:1.0-SNAPSHOT is missing, no dependency information availableThe POM for com.bjsxt:service:jar:1.0-SNAPSHOT is missing, no dependency information availableFailure to find com.bjsxt:service:jar:1.0-SNAPSHOT in http://maven.aliyun.com/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus-aliyun has elapsed or updates are forced
老师这个报的是什么错,说是找不到依赖,网上的方法试了很多,都没解决
非常抱歉给您带来不好的体验!为了更深入的了解您的学习情况以及遇到的问题,您可以直接拨打投诉热线:
我们将在第一时间处理好您的问题!
关于
课程分类
百战程序员微信公众号
百战程序员微信小程序
©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园网站维护:百战汇智(北京)科技有限公司 京公网安备 11011402011233号 京ICP备18060230号-3 营业执照 经营许可证:京B2-20212637