pythonclosing
Ⅰ Successfully installed python 2.7卡住了
npm安裝windows-build-tools卡住,停在了Successfully installed Python 2.7
這個問題據說是這個包自身的bug
1、保證你安裝了Visual Studio
2、在資源管理中搜索 %temp% ,window系統按住win按鍵直接搜索就可以
3、在搜索到的文件夾 %temp% 中創建 dd_client_.log 文件,並且填入內容 Closing installer. Return code: 3010.
electron備忘錄:
補充:electron項目需要node的版本與electron有對應關系,實際上是node的NODE_MODULE_VERSION要和electron abi要對應,可以在這個地址查看下 https://nodejs.org/zh-cn/download/releases/
Ⅱ python 設計一個名為Stock的類來表示一個公司的股票
class Stock():
def __init__(self):
self.__no = ""
self.__name = ""
self.previousClosingPrice = 0
self.currentPrice = 0
def creatStock(self,stockInfo):
self.__no = stockInfo[0]
self.__name = stockInfo[1]
self.previousClosingPrice = stockInfo[2]
self.currentPrice = stockInfo[3]
def getStockName(self):
return(self.__name)
def getStockNo(self):
return(self.__no)
def setPreviousClosingPrice(self,price):
self.previousClosingPrice = price
def getPreviousClosingPrice(self):
return(self.previousClosingPrice)
def setCurrentPrice(self,price):
self.currentPrice = price
def getCurrentPrice(self):
return(self.currentPrice)
def getChangePercent(self):
return((self.currentPrice - self.previousClosingPrice)/self.currentPrice)
stock = Stock()
stock.creatStock(["601318","中國平安",63.21,64.39])
print(stock.getStockNo())
print(stock.getStockName())
print(stock.getCurrentPrice())
print(stock.getPreviousClosingPrice())