给出如下代码: (D)ict(C)olor = {"seashell":"海贝色","gold":"金色","pink":"粉红色","brown":"棕色","purple":"紫色","tomato":"西红柿色"} 以下选项中能输出“海贝色”的是( )
(A)print(
(D)ict
(C)olor["seashell"])
(B)print(
(D)ict
(C)olor.keys())
(C)print(
(D)ict
(C)olor.values())
(D)print(
(D)ict
(C)olor["海贝色"])
参考答案
继续答题:下一题
更多python基础知识试题
- 1给出如下代码:MonthandFlower={"1月":"梅花","2月":"杏花","3月":"桃花","4月":"牡丹花",\ 5月:"石榴花","6月":"莲花","7月":"玉簪花","8月":"桂花","9月":"菊花",10月:"芙蓉花",\"11月":"山茶花","12月":"水仙花"} n = input("请输入1—12的月份:") print(n + "月份之代表花:" + MonthandFlower.get(str(n)+"月")) 以下选项中描述正确的是( )
- 2下列表达式的值为True的是( )
- 3关于Python中的复数,下列说法错误的是
- 4字典对象的______________方法返回字典的“值”列表
- 5下面代码的输出结果是()def exchange(a,b): a,b = b,a return (a,b)x = 10y = 20x,y = exchange(x,y)print(x,y)