單項(xiàng)選擇題在Python中,如何創(chuàng)建一個子類?()

A.class SubClass(SuperClass):pass
B.class SubClass inherits SuperClass
C.class SubClass:super(SuperClass)
D.class SubClass ->SuperClass


您可能感興趣的試卷

你可能感興趣的試題

1.單項(xiàng)選擇題在Python中,如何從JSON字符串中解析一個字典?()

A.json.loads(json_str)
B.json.parse(json_str)
C.dict.fromJSON(json_str)
D.parseJSON(json_str)

2.單項(xiàng)選擇題在Python中,如何將一個字典轉(zhuǎn)換為JSON字符串?()

A.json.dumps(dict)
B.dict.toJSON()
C.json.stringify(dict)
D.dict.toString()

3.單項(xiàng)選擇題在Python中,如何復(fù)制一個列表?()

A.list.copy()
B.copy(list)
C.list[:]
D.A和C都對

4.單項(xiàng)選擇題在Python中,如何獲取一個函數(shù)的名稱?()

A.function.__name__
B.function.getName()
C.functionName(function)
D.function.name()

5.單項(xiàng)選擇題在Python中,如何將一個浮點(diǎn)數(shù)四舍五入到指定的小數(shù)位數(shù)?()

A.round(float,decimals)
B.float.round(decimals)
C.roundUp(float,decimals)
D.float.toFixed(decimals)