Để hiển thị từng giá trị của mảng a có n phần tử trên 1 dòng: ta dùng lệnh nào?

Lý thuyết 1

Quiz
•
Instructional Technology
•
8th Grade
•
Medium
Hiên Đào
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
For i in range(n): print(i, end=' ')
For i in range(n): print(a[i], end=' ')
For i in range(1,n+1): print(i, end=' ')
For i in range(1,n+1): print(a[i], end=' ')
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để hiển thị từng giá trị của mảng a có n phần tử trên n dòng: ta dùng lệnh nào?
For i in range(n): print(i)
For i in range(n): print(a[i], end=' ')
For i in range(n): print(i, end=' ')
For i in range(n): print(a[i])
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để hiển thị từng giá trị của mảng a có n phần tử trên n dòng: ta dùng lệnh nào?
for i in a: print(a[i])
for i in a: print(a[i], end=' ')
for i in a: print(i)
for i in a: print(i, end=' ')
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để đưa ra vị trí phần tử lớn nhất của mảng a có n phần tử ta dùng đoạn lệnh nào?
ma=a[0]
for i in range(1,n):
if ma<a[i]:
ma=a[i]
vt=i+1
print(i)
ma=a[0]
for i in range(1,n):
if ma>a[i]:
ma=a[i]
vt=i+1
print(i)
ma=a[0]
for i in range(1,n):
if ma<a[i]:
ma=a[i]
vt=i
print(i)
ma=a[0]
for i in range(1,n):
if ma>a[i]:
ma=a[i]
vt=i
print(i)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để đưa ra vị trí phần tử nhỏ nhất của mảng a có n phần tử ta dùng đoạn lệnh nào?
ma=a[0]
for i in range(1,n):
if ma<a[i]:
ma=a[i]
vt=i+1
print(i)
ma=a[0]
for i in range(1,n):
if ma>a[i]:
ma=a[i]
vt=i+1
print(i)
ma=a[0]
for i in range(1,n):
if ma<a[i]:
ma=a[i]
vt=i
print(i)
ma=a[0]
for i in range(1,n):
if ma>a[i]:
ma=a[i]
vt=i
print(i)
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đâu là thuật toán tìm tổng các ước của 1 số nguyên dương n?
t=0
for i in range(n):
if n%i==0:
t+=i
print(t)
t=0
for i in range(1,int(n**0.5)):
if n%i==0:
t+=i
print(t)
t=0
for i in range(1,int(n**0.5)+1):
if n%i==0:
t+=i
if i*i!=n:
t+=n//i
print(t)
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đâu là Hàm kiểm tra số n có phải là số hoàn hảo?
def hh(n):
t=0
for i in range(n+1):
if n%i==0:
t+=i
return t==n:
def hh(n)
t=0
for i in range(1,int(n**0.5)+1):
if n%i==0:
t+=i
if i*i!=n:
t+=n//i
return t==n
def hh(n):
t=0
for i in range(1,int(n**0.5)+1):
if n%i==0:
t+=i
return t==n
Create a free account and access millions of resources
Similar Resources on Quizizz
12 questions
Основи Python

Quiz
•
7th - 12th Grade
10 questions
TEKNOLOGI INFORMASI DAN KOMUNIKASI (TIK) KELAS 8

Quiz
•
8th Grade
10 questions
kartkuwka z religii

Quiz
•
KG - Professional Dev...
10 questions
python

Quiz
•
2nd Grade - University
11 questions
DATA ANALYSIS 101 (Formulas / Functions)

Quiz
•
8th - 9th Grade
10 questions
Media and Information Literacy

Quiz
•
1st Grade - University
10 questions
DL Refresher

Quiz
•
KG - Professional Dev...
14 questions
impianto del gas

Quiz
•
8th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
40 questions
Week 4 Student In Class Practice Set

Quiz
•
9th - 12th Grade
40 questions
SOL: ILE DNA Tech, Gen, Evol 2025

Quiz
•
9th - 12th Grade
20 questions
NC Universities (R2H)

Quiz
•
9th - 12th Grade
15 questions
June Review Quiz

Quiz
•
Professional Development
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
25 questions
Triangle Inequalities

Quiz
•
10th - 12th Grade
Discover more resources for Instructional Technology
25 questions
SS Combined Advisory Quiz

Quiz
•
6th - 8th Grade
20 questions
Congruent and Similar Triangles

Quiz
•
8th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
6 questions
Earth's energy budget and the greenhouse effect

Lesson
•
6th - 8th Grade
15 questions
SMART Goals

Quiz
•
8th - 12th Grade
20 questions
Lesson: Slope and Y-intercept from a graph

Quiz
•
8th Grade