Utilitário para cálculos
Publicado por Leonardo Berbert Gomes 06/01/2005
[ Hits: 5.250 ]
Homepage: https://www.linkedin.com/in/leoberbert
Script simples feito em inputs que calcula impostos pagos, salário, e saldo atual mês a mês.
#!/usr/bin/python import sys print "Time to calculate some interest... ok." print "What is the APR (as a percentage)? ", apr = float(sys.stdin.readline()) / 100.0 mpr = apr / 12 print "\nWhat is your monthly payment? ", payment = float(sys.stdin.readline()) print "\nWhat is your beginning balance? ", balance = float(sys.stdin.readline()) print "-" * 50 print "SCHEDULE..." print "-" * 50 i = 1 begin_balance = balance end_balance = balance total_interest = 0.0 total_paid = 0.0 while end_balance > 0.0: print "MONTH", `i` interest = mpr * begin_balance # Don't overpay. if payment <= begin_balance + interest: real_payment = payment else: real_payment = begin_balance + interest end_balance = begin_balance + interest - real_payment print "\tending balance:" print "\t %f + %f - %f = %f" % \ (begin_balance, interest, real_payment, end_balance) ## set up next month. i = i + 1 begin_balance = end_balance ## count totals. total_paid = total_paid + real_payment total_interest = total_interest + interest print "TOTAL PAID: %f\tTOTAL INTEREST PAID: %f" % (total_paid, total_interest)
Simples script para atrasar/adiantar legendas
Procura músicas em diretório local
Adição de chaves a repositórios
Probabilidade de Vencer - Poker Texas Hold
Nenhum comentário foi encontrado.
LazyDocker – Interface de Usuário em Tempo Real para o Docker
Instalando COSMIC no Linux Mint
Turbinando o Linux Mint: o poder das Nemo Actions
Inteligência Artificial no desenvolvimento de software: quando começar a usar?
[Resolvido] Algo deu errado ao abrir seu perfil
Usando o VNSTAT para medir o seu consumo de internet
Habilitando clipboard manager no ambiente COSMIC
Problema com som no laptop (5)
Quando vocês pararam de testar distros? (11)
Não estou conseguindo fazer funcionar meu Postfix na versão 2.4 no Deb... (2)









