BBrother commited on
Commit
e52c88f
1 Parent(s): 5f241d9

Update v2_3.py

Browse files
Files changed (1) hide show
  1. v2_3.py +13 -4
v2_3.py CHANGED
@@ -81,11 +81,9 @@ ca = ""
81
  # 创建一个字典来存储变量名和对应的值
82
  variables = {}
83
 
84
- # 打开文件
85
- with open('BianLiang.txt', 'r') as file:
86
  for line in file:
87
- print("读取行:", line) # 添加调试语句,查看每行是否正确读取
88
-
89
  # 分割每一行,以等号为分隔符
90
  parts = line.strip().split('=')
91
 
@@ -110,6 +108,17 @@ w = variables.get('w', '')
110
  st = variables.get('st', '')
111
  ca = variables.get('ca', '')
112
 
 
 
 
 
 
 
 
 
 
 
 
113
 
114
  # %cd /content
115
  # %env TF_CPP_MIN_LOG_LEVEL=1
 
81
  # 创建一个字典来存储变量名和对应的值
82
  variables = {}
83
 
84
+ # 打开文件(使用绝对路径)
85
+ with open('/content/BianLiang.txt', 'r') as file:
86
  for line in file:
 
 
87
  # 分割每一行,以等号为分隔符
88
  parts = line.strip().split('=')
89
 
 
108
  st = variables.get('st', '')
109
  ca = variables.get('ca', '')
110
 
111
+ # 输出结果
112
+ print("a =", a)
113
+ print("b =", b)
114
+ print("c =", c)
115
+ print("d =", d)
116
+ print("D =", D)
117
+ print("w =", w)
118
+ print("st =", st)
119
+ print("ca =", ca)
120
+
121
+
122
 
123
  # %cd /content
124
  # %env TF_CPP_MIN_LOG_LEVEL=1