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
#!/bin/bash | |
# ====================CONFIG THIS =============================== # | |
BACKGROUD_COLOR="#161821" # Background Color | |
FOREGROUND_COLOR="#c6c8d1" # Text | |
COLOR_01="#1e2132" | |
COLOR_02="#e27878" | |
COLOR_03="#b4be82" |
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
#!/usr/bin/bash | |
# zn - as zettell | |
# new export variables EDITOR for your editor and | |
#+ NOTES for your notes folder. | |
main () { | |
note_id=$(date +'%Y%m%d%H%M%S') | |
$EDITOR $NOTES/"$note_id".md | |
} |
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
def computador_escolhe_jogada(n, m): | |
computadorRemove = 1 | |
while computadorRemove != m: | |
if (n - computadorRemove) % (m+1) == 0: | |
return computadorRemove | |
else: | |
computadorRemove += 1 |
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
def factorial(x): | |
fact = count = 1 | |
while count <= x: | |
fact = fact * count | |
count += 1 | |
return fact | |
def coefBinom(n, k): | |
aux = factorial(n) // (factorial(k) * factorial(n - k)) |
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
numeroDoUsuario = int(input('Digite um número: ')) | |
divisor = 2 | |
Primo = True | |
while divisor < numeroDoUsuario and Primo: | |
if numeroDoUsuario % divisor == 0: | |
Primo = False | |
divisor += 1 |
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
numeroDoUsuario = int(input('Digite um número: ')) | |
divisor = 2 | |
Primo = True | |
while divisor < numeroDoUsuario: | |
if numeroDoUsuario % divisor == 0: | |
Primo = False | |
divisor += 1 |