刚开始学算法导论,这是我写的第一个python程序,作为菜鸟真的不知道该怎么改了
报错 File "F:/python/edit/apex.py", line 3
for i in range(10);
^
SyntaxError: invalid syntax
Process finished with exit code 1
源代码
a = [0,1,2,3,4,5,6,7,8,9];
for i in range(10);
for j in range(i+1,10);
first = float (a[i])
second = float (a[i])
if first < second;
a[i] = a[j]
a[j] = first
print(a[0]);
求大佬修改,运行出最大值9
QAQ