Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrew Craighead interputed

  • University of Missouri
  • Columbia, MO
View GitHub Profile
@interputed
interputed / mega-millions.py
Last active Oct 24, 2018
Mega-Millions Simulator in Python3
View mega-millions.py
#!/bin/python3
import random
def GetTime(draws):
# Just a helper function for printing how much time has passed to win the jackpot.
years = draws // 104
rem = draws % 104
weeks = rem // 2
return "{} years and {} weeks".format(years, weeks)