Problem of line breaking

Asked

Viewed 94 times

1

My code is giving error in Presentation error Uri, which is about line breaking

a = 0
p = [2,3,4,1]
s = str(input()).split(" ")
for k in range(4):
    a = a + float(s[k])*p[k]

a = a/(2+3+4+1)
print("Media: {:.1f}\n".format(a))
if a >= 7.0:
    print("Aluno aprovado.\n")
elif a >= 5.0:
    print("Aluno em exame.\n")
    ne = float(input())
    m = (ne+a)/2
    print("Nota do exame: {:.1f}\n".format(ne))
    if m >= 5:
        print("Aluno aprovado.\n")
    else:
        print("Aluno reprovado.\n")
    print("Media final: {:.1f}\n".format(m))
else:
    print("Aluno reprovado.\n")

However, I can’t find an error in this code...

  • Fact - it usually runs here - can it tell you exactly what you’re doing? (And put the error too)

  • It’s an exercise at Uri Online. The result is correct, but the site returns an error of "Presentation error", which is "visual" errors (or poorly presented), usually are breaks of lines that were not placed... But I’ve tried every way...

  • But I already figured out... in python it always skips a dps line of "print"... I was skipping two then...

  • 1

    Good! Here has an explanation of how to do the print not break line.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.