diff --git a/homework2/.idea/.gitignore b/homework2/.idea/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..13566b81b018ad684f3a35fee301741b2734c8f4
--- /dev/null
+++ b/homework2/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/homework2/.idea/inspectionProfiles/Project_Default.xml b/homework2/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4ebeef73e1a72b62075747eb1e5bb3b86786fd87
--- /dev/null
+++ b/homework2/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework2/.idea/inspectionProfiles/profiles_settings.xml b/homework2/.idea/inspectionProfiles/profiles_settings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..105ce2da2d6447d11dfe32bfb846c3d5b199fc99
--- /dev/null
+++ b/homework2/.idea/inspectionProfiles/profiles_settings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework2/.idea/misc.xml b/homework2/.idea/misc.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a50ac5b1ad75b566c394a7b9d198b155584f8bc9
--- /dev/null
+++ b/homework2/.idea/misc.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework2/.idea/modules.xml b/homework2/.idea/modules.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fdd8fdfd13437ad5929c98cfa256df55ff0f5e08
--- /dev/null
+++ b/homework2/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework2/.idea/pythonProject1.iml b/homework2/.idea/pythonProject1.iml
new file mode 100644
index 0000000000000000000000000000000000000000..74d515a027de98657e9d3d5f0f1831882fd81374
--- /dev/null
+++ b/homework2/.idea/pythonProject1.iml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework2/.idea/vcs.xml b/homework2/.idea/vcs.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6c0b8635858dc7ad44b93df54b762707ce49eefc
--- /dev/null
+++ b/homework2/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/homework2/7.5/__pycache__/datas.cpython-312.pyc b/homework2/7.5/__pycache__/datas.cpython-312.pyc
new file mode 100644
index 0000000000000000000000000000000000000000..e064b69b26ed4f0c04a7cb687263bd5b85b9d269
Binary files /dev/null and b/homework2/7.5/__pycache__/datas.cpython-312.pyc differ
diff --git a/homework2/7.5/datas.py b/homework2/7.5/datas.py
new file mode 100644
index 0000000000000000000000000000000000000000..0d577182d092894521998cef7fbf86b26269e017
--- /dev/null
+++ b/homework2/7.5/datas.py
@@ -0,0 +1,156 @@
+
+datas=[
+ {
+ "city":"大同",
+ "area":100,
+ "rooms":2,
+ "school":1,
+ "style":1,
+ "price":8000
+ },
+ {
+ "city":"大同",
+ "area":100,
+ "rooms":2,
+ "school":1,
+ "style":1,
+ "price":7800
+ },
+ {
+ "city":"大同",
+ "area":100,
+ "rooms":2,
+ "school":1,
+ "style":1,
+ "price":8200
+
+ },
+ # 模拟
+ {
+ "city": "大同",
+ "area": 130,
+ "rooms": 3,
+ "school": 1,
+ "style": 1,
+ "price": 8300
+ },
+ {
+ "city":"大同",
+ "area":135,
+ "rooms":3,
+ "school":1,
+ "style":1,
+ "price":8300
+ },
+ {
+ "city":"大同",
+ "area":140,
+ "rooms":3,
+ "school":1,
+ "style":1,
+ "price":8600
+ },
+
+{
+ "city": "大同",
+ "area": 130,
+ "rooms": 3,
+ "school": 1,
+ "style": 1,
+ "price": 5000
+ },
+ {
+ "city":"大同",
+ "area":135,
+ "rooms":3,
+ "school":1,
+ "style":1,
+ "price":5300
+ },
+ {
+ "city":"大同",
+ "area":140,
+ "rooms":3,
+ "school":1,
+ "style":1,
+ "price":6300
+ },
+ {
+ "city": "大同",
+ "area": 100,
+ "rooms": 2,
+ "school": 1,
+ "style": 1,
+ "price": 8000
+ },
+ {
+ "city": "大同",
+ "area": 100,
+ "rooms": 2,
+ "school": 1,
+ "style": 1,
+ "price": 7800
+ },
+ {
+ "city": "大同",
+ "area": 100,
+ "rooms": 2,
+ "school": 1,
+ "style": 1,
+ "price": 8200
+
+ },
+ # 模拟
+ {
+ "city": "大同",
+ "area": 130,
+ "rooms": 3,
+ "school": 1,
+ "style": 1,
+ "price": 8300
+ },
+ {
+ "city": "大同",
+ "area": 135,
+ "rooms": 3,
+ "school": 1,
+ "style": 1,
+ "price": 8300
+ },
+ {
+ "city": "大同",
+ "area": 140,
+ "rooms": 3,
+ "school": 1,
+ "style": 1,
+ "price": 8600
+ },
+
+ {
+ "city": "大同",
+ "area": 130,
+ "rooms": 3,
+ "school": 1,
+ "style": 1,
+ "price": 8500
+ },
+ {
+ "city": "大同",
+ "area": 135,
+ "rooms": 3,
+ "school": 1,
+ "style": 1,
+ "price": 8300
+ },
+ {
+ "city": "大同",
+ "area": 140,
+ "rooms": 3,
+ "school": 2,
+ "style": 2,
+ "price": 8600
+ },
+
+
+]
+
diff --git a/homework2/7.5/predict.py b/homework2/7.5/predict.py
new file mode 100644
index 0000000000000000000000000000000000000000..12b92ca4a8ed2b92d124ddd200351d76289fc776
--- /dev/null
+++ b/homework2/7.5/predict.py
@@ -0,0 +1,26 @@
+import numpy as np
+
+
+
+
+from datas import datas
+X=[]
+Y=[]
+cityMark={"吕梁":1,"太原":2}
+for item in datas:
+ single=[]
+ single.append(cityMark[item["city"]])
+ single.append(item["area"])
+ single.append(item["rooms"])
+ single.append(item["school"])
+ single.append(item["style"])
+ X.append(single)
+ Y.append(item["price"])
+
+X=np.array(X)
+Y=np.array(Y)
+
+
+theta=np.linalg.pinv(X.T.dot(X)).dot(X.T).dot(Y)
+print(theta.dot(np.array([2,100,2,1,1])))
+
diff --git a/homework2/main.py b/homework2/main.py
new file mode 100644
index 0000000000000000000000000000000000000000..5596b44786f04e4810aefe9f8d712f08ed310f71
--- /dev/null
+++ b/homework2/main.py
@@ -0,0 +1,16 @@
+# This is a sample Python script.
+
+# Press Shift+F10 to execute it or replace it with your code.
+# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
+
+
+def print_hi(name):
+ # Use a breakpoint in the code line below to debug your script.
+ print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
+
+
+# Press the green button in the gutter to run the script.
+if __name__ == '__main__':
+ print_hi('PyCharm')
+
+# See PyCharm help at https://www.jetbrains.com/help/pycharm/