haiyinshushe
haiyinshushe
2017-03-06 13:04

求大佬帮我看看python找最大报错怎么改

  • python
  • 源代码
  • 算法导论

刚开始学算法导论,这是我写的第一个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

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

1条回答