This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let calculaJuros = () => { | |
let aporteMensal = 2500; // 2.5k reais | |
let jurosMensais = 0.005; // 0.5% | |
let meses = 12 * 20; // 20 anos | |
let acumulado = 0; | |
for(let i = 0; i < meses; i++) { | |
let juros = acumulado * jurosMensais; | |
acumulado += aporteMensal + juros; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### ================================================== ### | |
### ### | |
### Pequeno jogo da velha em python, para aprender a ### | |
### programar python usando dicionários e estruturas ### | |
### de controle. ### | |
### ### | |
### ================================================== ### | |
def makeBoard() : | |
theBoard = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//classe dos elementos DIV que contem o vídeo | |
//k-u-P-m | |
//o attribute que precisamos para pegar o id do vídeo | |
//data-id | |
//pegando os vídeos | |
VideoElements = document.getElementsByClassName('k-u-P-m'); | |
for (var i = 0, total = VideoElements.length; i < total; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
// Função que dá as bolas numeradas para o sorteio | |
var getBolas = function () { | |
var numPossiveis = []; | |
for (var i = 1; i < 61; i++) { | |
numPossiveis.push(i); | |
} | |
return numPossiveis; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var n = 10; | |
var decrementaN = function () { | |
n = n-1; | |
}; | |
for (var i = 0; i < n;decrementaN()) { | |
console.log(n) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){var s=document.createElement('script');s.setAttribute('src','http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.4/underscore-min.js');document.getElementsByTagName('body')[0].appendChild(s);})() |