121COM Phase Test 2

出口

質問 1 of 1

  残り時間


0
97101
0
120
block

What is printed to the screen when we execute the following Python code? Note: You will receive several different questions concerning this code during the Phase test. class stockSystem: __prices = {'apples':100, 'bananas':200, 'blueberries':300} def __init__(self): self.stockD = {} def addStock(self, item, quantity): if item in self.stockD: self.stockD[item] = self.stockD[item] + quantity else: self.stockD[item] = quantity def stockQuery(self, item): return(self.stockD[item]) def printAllStock(self): for entry in self.stockD: print( entry + ':' + str(self.stockD[entry]) ) def priceCheck(item): if item in stockSystem.__prices: return( stockSystem.__prices[item] ) else: raise ValueError('Price data not available')

正しい答えを選択してください  

(0/0)












97102
0
120
none
97103
0
120
none
97104
0
120
none
97105
0
120
none