Ministério da Educação
Brasil um país de todos
Personal tools
Navigation
Log in


Forgot your password?
 
Document Actions

slides05-ex1.py

by Cicero Garrozi last modified 2015-04-14 07:18

Click here to get the file

Size 1 kB - File type text/python-source

File contents

altura = 1000
quantidade = 0

while altura != 0:
    altura = float(input("Digite a altura do aluno ou 0 para sair: "))
    if altura == 0:
        break
    idade = int(input("Digite a idade do aluno: "))

    if altura < 1.5 and idade > 13:
        quantidade += 1

print "Ha %d aluno(s) com idade maior que 13 anos e altura menor que 1.5m"%(quantidade)

Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: