版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/xiang12835/article/details/82729995
1 Python基本类型与环境搭建
知识点:
-
Python3.5环境搭建
-
基本类型
-
类型转换
演示:
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (In
tel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import antigravity
>>>
>>> int(12.123)
12
>>> int('123')
123
>>> str(123)
'123'
>>>
>>> float('123')
123.0
>>>
>>> 长=5
>>> 宽=3
>>> 面积=长*宽
>>> print(面积)
15
>>>