
Python编程基础测试-5级
Quiz
•
Computers
•
7th Grade
•
Hard
小星 翟
Used 4+ times
FREE Resource
Enhance your content in a minute
43 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
以下代码的输出结果是?() nums=list(range(100,201)) print(nums[::10])
[100,110,120,130,140,150,160,170,180,190,200]
[100,101,102,103,104,105,106,107,108,109,200]
[100,111,122,133,144,155,166,177,188,199]
[199,188,177,166,155,144,133,122,111,100]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
以下代码的输出结果是?() def count_odd_numbers(n): return len([num for num in range(n) if num % 2 != 0]) print(count_odd_numbers(20))
5
8
10
15
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
以下代码的输出结果是?() for i in range(5): print(''*(5-i)+'*'*(2*i+1))
错误,代码无法运行
打印出一个梯形状的星星
打印出一个倒立的三角形
打印出一个正立的三角形
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
运行以下代码的结果是?() nums=range(1,11) sliced_nums=nums[2:8] result=sum(sliced_nums)*3 print(result)
90
99
81
72
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
集合a={1,2,3,4,5,6},b={1,3,5,7,9},则a&b的结果是?()
{1,3,5}
{2,4,6}
{1,2,3,4,5,6,1,3,5,7,9}
[1,3,5]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
下列程序的运行结果?() a={6,5,4,3,2,1} a.remove(1) print(a)
{6,5,4,3,2}
{1,2,3,4,5}
{1,2,3,4,5}
[2,3,4,5,6]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
智慧种植社团想要确定农植园西红柿元组的最大值,可以使用下列方法?()
list()
max()
min()
sum()
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
