Last active
January 26, 2019 00:46
-
-
Save aphexmunky/6e383270d930313beb17c3e31c3acf3c to your computer and use it in GitHub Desktop.
Calculates the kardashev value for a civilisation given its power usage in watts
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
import math | |
def kardashev(p): | |
""" | |
Carl Sagans formula for determining the value intermediate kardashev scale value | |
Parameters: | |
p (int): the value in watts the civilisation uses | |
Returns: | |
float: the kardashev value for the civilisation | |
""" | |
return (math.log10(p) -6)/10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment