Skip to content

Instantly share code, notes, and snippets.

View pedrorodbit's full-sized avatar
🎯
Focusing

João Pedro pedrorodbit

🎯
Focusing
  • Rio de Janeiro, Brasil
View GitHub Profile
<?
# MIT license, do whatever you want with it
#
# This is my invoice.php page which I use to make invoices that customers want,
# with their address on it and which are easily printable. I love Stripe but
# their invoices and receipts were too wild for my customers on Remote OK
#
require_once(__DIR__.'/../vendor/autoload.php');
print('===CALCULADORA LATAS DE CERVEJA PARA KM===\n\n')
# Pergunta quantos kg de latas ele quer verificar
pesoLatas = input('Quantos KG de latas você tem?\n')
# Lista com quantidade (em ML) que as latas são comercializadas
latasML = [
269,
350,
473
print('===CALCULADOR DE CONSUMO MENSAL DE ENERGIA===\n\n')
aparelho = input('Qual aparelho você quer saber o consumo mensal? \n')
watt = input('Quantos Watts esse aparelho consome? \n')
hrs = input('Quantas horas esse aparelho fica ligado por dia? \n')
custo = input('Quanto custa o kW/h na sua região? (em reais) \n')
#Quantos Quilo Watt/Hora o aparelho consome
kWh = (float(watt) / 1000) * float(hrs)