Last active
March 21, 2019 19:09
-
-
Save tonejito/2afbd4ea63b8e98eba4d5f8b6f56807f to your computer and use it in GitHub Desktop.
Creo que deberíamos de comer mas sano CC @nehnemini
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/env python | |
# = ^ . ^ = | |
import math | |
pi = math.pi | |
a = 2 * pi | |
print "a = 2 * pi => " , a | |
b = pi ** a | |
print "b = pi ** a => " , b | |
c = math.sqrt(b) | |
print "c = math.sqrt(b) => " , c | |
# https://stackoverflow.com/a/6681808 | |
d,e = math.modf(c) | |
print "d,e = math.modf(c) => (" , d , e , ")" | |
f = e - 15 | |
print "f = e - 15 => " , f |
Siempre podemos "aplicar la ñera" y forzar el resultado xD
$ ./pizzas.py
a = 2 * pi => 6.28318530718
b = pi ** a => 1329.48908322
c = math.sqrt(b) => 36.4621596072
d,e = math.modf(c) => ( 0.462159607208 36.0 )
f = e - 15 => 21.0
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Si da 21, pero sobra cambio para la propina xD