21.12.2022 Views

python_para_desenvolvedores_2ed

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Respostas dos exercícios IV 349

print 'Linha:', l

print 'Comprimento:', l.comp()

print 'Triangulo:', t

print 'Area:', t.area()

# Mostra:

# Ponto A: (2.0, 3.0, 1.0)

# Ponto B: (5.0, 1.0, 4.0)

# Ponto C: (4.0, 2.0, 5.0)

# Linha: (2.0, 3.0, 1.0) => (5.0, 1.0, 4.0)

# Comprimento: 4.7

# Triangulo: (2.0, 3.0, 1.0) => (5.0, 1.0, 4.0) => (4.0, 2.0, 5.0))

# Area: 3.9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!