大家好。我在为我的cs期末考试而学习,字典在里面。我对字典很熟悉,但这本让我难堪。我该如何着手解决这样一个问题?你知道吗
Given the dictionary below, continue to write code (old style, no functions required) that will produce a list of all the keys for which the values are in the range 1 to 100 inclusive. Do not hardcode your program for the given dictionary.
D = {1:1000, 2:2000, 3:3000, 1111:10, 2222:20, 3333:30}
是的,这是一个实际的复习问题,但这不是家庭作业。你知道吗
我在想我应该在字典中做一个for循环,但那不会有帮助,因为dict
是存储的key:value
,我真的只需要比较value
。你知道吗
任何事都值得感激!你知道吗
我想我真的弄明白了!你知道吗
我没有运用理解力,因为我的教授从来没有因为任何原因复习过。你知道吗
以下内容如何:
相关问题 更多 >
编程相关推荐