РУҚА
26

Number of parameter(s) of the function

ЕНТ · Информатика · Тапсырма 26 · Бағдарламалау негіздері
КүрделіЕНТ2025informatics26Нұсқа таңдау≈ 2 минутЖауап сверен с ключом

Number of parameter(s) of the function

Instruction: You are offered the test items on the base of text with one correct answer from four proposed ones. Read the text attentively and do the items.
List of numbers
Teacher gives to Ali unique n natural numbers and asks to sort this sequence in descending order without using sort() and sorted() functions. He has written the following code. However, during the execution program did not show the result as intended. Help him to fix the code.
def sorting (list):
for i in range(0,len(list)-1):
for j in range(i, len (list)-1): #incorrect
if list[i]<list[j]:
temp = list[i]
list[i] = list[j]
list[j] = temp
list = []
n=int(input())
for i in range(n):
list.append(int(input()))
sorting (list)
print (list)

Сіздің жауабыңыз

Бір нұсқаны таңдаңыз.

Бұл есепке кеңестер әлі жазылмағанТақырыптың қалған тапсырмаларында олар бар — ал қадамдық талдау мұнда да ашық.
Всё равно не складывается?Полное Шешім с обоснованием каждого шага — на отдельной странице.
Шешімді ашу

Тапсырма 26 ЕНТ, информатика

Задача из темы «Бағдарламалау негіздері»: в ней 51 задача жауабымен және қадамдық талдауымен. В 26-м номере бланка — 5 задач.

Жауапты осы жерде тексеруге болады, ал егер шықпаса — ашуға болады көмекші кеңес немесе талдау. Тіркелу қажет емес.