Skip to content

Instantly share code, notes, and snippets.

View fabiom's full-sized avatar

Fábio Meneghetti fabiom

View GitHub Profile
@fabiom
fabiom / BirthdayParadox.jl
Last active April 7, 2021 00:36
Returns the probability of two people out of n having the same birthday.
function BirthdayParadox(n)
# Returns the probability of two people out of n having the same birthday.
1-prod( ((365-n+1):365.0) /365.0 )
end
@fabiom
fabiom / jogo-da-velha.py
Created May 11, 2019 04:17
Jogo da velha em python
import random
tab = []
for i in range(9):
tab.append("-")
jogador = []
computador = []
def imprime():
@fabiom
fabiom / roman.py
Last active June 13, 2020 21:06
Display integers using roman numerals.
#!/usr/bin/env python3
# Run `import roman` then you can use the function `roman.rnumeral()`.
def rnumeral(n):
if n >= 4000:
print('The largest number that can be represented in roman numerals is 3999.')
return
if n <= 0:
print('Choose a positive number.')

Keybase proof

I hereby claim:

  • I am fabiom on github.
  • I am fabiom (https://keybase.io/fabiom) on keybase.
  • I have a public key whose fingerprint is 45C9 037A 07F7 EF49 1133 9C25 77DE 719D 93EF C14F

To claim this, I am signing this object: