python学习笔记一
来源:互联网 发布:js body append html 编辑:程序博客网 时间:2024/05/16 09:30
1. input()默认是str类型,如果进行计算,需要手动转换成int型数据
>>> x =input('x:=')x:=4>>> y =input('y:=')y:=4>>> print(x*y)Traceback (most recent call last): File "<pyshell#3>", line 1, in <module> print(x*y)TypeError: can't multiply sequence by non-int of type 'str'>>> print(int(x)*int(y))16>>>
0 0
- Python学习笔记(一)
- Python学习笔记[一]
- Python学习笔记一
- python学习笔记(一)
- Python学习笔记(一)
- Python学习笔记一
- python学习笔记一
- python 学习笔记一
- python 学习笔记一
- python学习笔记: 一
- python学习笔记(一)
- Python学习笔记(一)
- python学习笔记一
- python学习笔记一
- Python学习笔记一
- Python学习笔记一
- Python学习笔记一
- python学习笔记一
- java (功能篇) dom4j 生成xml文件
- ListView具有多种item布局——实现微信对话列
- 第十二周项目3-用递归的方法求解(斐波那契数列)
- 搭建你的Spring.Net+Nhibernate+Asp.Net Mvc 框架 (一)搭建你的环境
- 配置1——VI
- python学习笔记一
- Cocos2d-JS 实现X轴自定义视窗跟随
- 第十二周上机项目一
- POJ2359 questions
- Fragment介绍
- poj 1163
- Leetcode BST Inorder Traverse
- poj1426
- Problem E: 时间:24小时制转12小时制