Exercício 8 da lista de Expressões Aritméticas e Variáveis em Python


Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content


This Python template lets you get started quickly with a simple one-page playground.

leoes = 15;
zebras = 26;
macacos = 14;
serpentes = 29
macas = 26;
total_de_animais = leoes + zebras + macacos + serpentes;
total_de_cabecas = total_de_animais;
total_de_patas = leoes*4 + zebras*4 + macacos*4;
print("Total de animais: ", total_de_animais);
print("Total de cabecas: ", total_de_cabecas);
print("Total de patas: ", total_de_patas);

Advanced usage

If you want a more complex example (external libraries, viewers...), use the Advanced Python template

Open Source Your Knowledge: become a Contributor and help others learn. Create New Content