Skip to content

Commit a305d56

Browse files
Update M4-stock.py
1 parent 9eba4de commit a305d56

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

M4-stock.py

+2-15
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
def price():
33
import random
44
from typing import Any
5+
#from (文件名) import family_housefund
56
global BANA
67
BANA=random.randint(1,500)
78
print ('欢迎光临模拟证券交易所' \
89
'\n今天的证券行情是:'\
910
'\nBANA Banana Inc. ', BANA, \
1011
'\n投资有风险,入市须谨慎!')
1112
return BANA,
12-
money=100000 #后期改成用command get到的家庭资金
13+
money=family_housefund #后期改成用command get到的家庭资金
1314
qty0=0
1415
hold0=0
1516
#买
@@ -66,17 +67,3 @@ def sell():
6667
else:
6768
print('对不起,输入无效,请输入一个正整数')
6869
return money, qty0
69-
#以下为调试
70-
price()
71-
buy()
72-
price()
73-
buy()
74-
view()
75-
price()
76-
sell()
77-
price()
78-
view()
79-
price()
80-
sell()
81-
price()
82-
view()

0 commit comments

Comments
 (0)