Skip to content

Instantly share code, notes, and snippets.

@CodeDrome
Created September 12, 2022 16:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CodeDrome/586bcac20af1d2c3dafdf75fc50aaca7 to your computer and use it in GitHub Desktop.
Save CodeDrome/586bcac20af1d2c3dafdf75fc50aaca7 to your computer and use it in GitHub Desktop.
halflife.py
import halflifeutilities as hlu
import radioactivenuclides as ran
def main():
print("-------------------------------------")
print("| codedrome.com |")
print("| Half Life of Radioactive Nuclides |")
print("-------------------------------------\n")
hlu.printnuclides()
# hlu.decay_table("uranium235", 8, 1048576)
# nuclide = ran.radioactive_nuclides["tellurium128"]
# halflife = nuclide['significand'] * 10 ** nuclide['exponent']
# at = hlu.at_time("tellurium128", halflife * 0.5, 1048576)
# print(at)
# tt = hlu.time_to("tellurium128", 0.5)
# print(f"{tt} Years")
# print(f"{tt:,.0f} Years")
# print(f"{tt / 1000000:,.0f} Million Years")
# print(f"{tt / 1000000000:,.0f} Billion Years")
# print(f"{tt / 1000000000000:,.0f} Trillion Years")
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment