提交 d63485fe 编写于 作者: 秦英杰

fix:整理

上级 2d5f6f90
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MaterialThemeProjectNewConfig">
<option name="metadata">
<MTProjectMetadataState>
<option name="userId" value="e706d3a:190c6184f70:-7c34" />
</MTProjectMetadataState>
</option>
</component>
</project>
\ No newline at end of file
......@@ -61,6 +61,7 @@
<component name="RunManager" selected="Python.13_numpy">
<configuration name="13_numpy" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
......@@ -83,6 +84,7 @@
</configuration>
<configuration name="main" type="PythonConfigurationType" factoryName="Python" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
......@@ -105,6 +107,7 @@
</configuration>
<configuration name="problem_solving_01 (1)" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
......@@ -127,6 +130,7 @@
</configuration>
<configuration name="problem_solving_01 (2)" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
......@@ -149,6 +153,7 @@
</configuration>
<configuration name="problem_solving_01" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
......@@ -171,6 +176,7 @@
</configuration>
<configuration name="test_mysql" type="PythonConfigurationType" factoryName="Python" temporary="true" nameIsGenerated="true">
<module name="python-demo" />
<option name="ENV_FILES" value="" />
<option name="INTERPRETER_OPTIONS" value="" />
<option name="PARENT_ENVS" value="true" />
<envs>
......
666
13.14
"黑马程序员"
"程序员"
print(666)
print(13.14)
print("黑马程序员")
\ No newline at end of file
print("程序员")
\ No newline at end of file
......@@ -8,12 +8,12 @@ print(name)
# 写一个浮点数字面量
13.14
# 写一个字符串字面量
"黑马程序员"
"程序员"
# 通过print语句输出各类字面量
print(666)
print(13.14)
print("黑马程序员")
print("程序员")
# 单行注释
#
......
# 方式1: 使用print直接输出类型信息
print(type("黑马程序员"))
print(type("程序员"))
print(type(666))
print(type(11.345))
# 方式2: 使用变量存储type()语句的结果
string_type = type("黑马程序员")
string_type = type("程序员")
int_type = type(666)
float_type = type(11.345)
print(string_type)
......@@ -14,6 +14,6 @@ print(float_type)
# 方式3: 使用type()语句,查看变量中存储的数据类型信息
name = "黑马程序员"
name = "程序员"
name_type = type(name)
print(name_type)
......@@ -9,7 +9,7 @@ print(type(num), num)
num2 = float("11.345")
print(type(num2), num2)
# 错误示例,想要将字符串转换成数字,必须要求字符串内的内容都是数字
# num3 = int("黑马程序员")
# num3 = int("程序员")
# print(type(num3), num3)
# 整数转浮点数
float_num = float(11)
......
......@@ -7,7 +7,7 @@ name_1 = "张三"
# 规则2:大小写敏感
Itheima = "黑马程序员"
Itheima = "程序员"
itheima = 666
print(Itheima)
print(itheima)
......
# 字符串字面量之间的拼接
print("学IT来黑马" + "月薪过万")
# 字符串字面量和字符串变量的拼接
name = "黑马程序员"
name = "程序员"
address = "建材城东路9号院"
tel = 4006189090
......
# 通过占位的形式,完成拼接
name = "黑马程序员"
name = "程序员"
message = "学IT来:%s" % name
print(message)
......@@ -9,7 +9,7 @@ avg_salary = 16781
message = "Python大数据学科,北京%s期,毕业平均工资:%s" % (class_num, avg_salary)
print(message)
name = "传智播客"
name = "客"
setup_year = 2006
stock_price = 19.99
message = "%s,成立于:%d,我今天的股价是:%f" % (name, setup_year, stock_price)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册