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())