Hola!
He creado un nuevo canal de YouTube con una amiga sobre diferentes temas de Python, así que los invito al primero de todos!!
#Mastery00
-Luthe
Hola!
He creado un nuevo canal de YouTube con una amiga sobre diferentes temas de Python, así que los invito al primero de todos!!
#Mastery00
-Luthe

En este ejemplo de código el ejercicio que el profesor nos puso fue calcular el área de una esfera al igual que su volumen.
Para comenzar hay que tener en mente que no se puede hacer todo lo que queramos en Python solo con ponerlo como es el caso de cosas muy específicas como utilizar el número específico de Pi que es 3.1416; para eso se tiene que ingresar el comando que utilicé en la parte de hasta arriba (import.math).
Después lo lógico es conocer las fórmulas de volumen y de área de una esfera las cuales son:
V = (4*pi*radius^3)/3
A = (4*pi*radius^2)
Como comentario extra cabe mencionar que Python realiza las operaciones matemáticas con un gran número de decimáles por lo que utilicé el comando «round( )» para redondear a solo dos decimales. Esto se hace de la siguiente manera:
Se calcula el valor de una variable, por ejemplo: x = 1/3 lo que nos daría como respuesta 0.333333333…
Una vez calculado el valor se utiliza la función de roud para que unicamente nos de el resultado con dos decimales.
Y finalmente utilizamos el comando «print( )» para proyectar las respuestas de los calculos.
-Luthe
Be yourself; Everyone else is already taken.
— Oscar Wilde.
This is the first post on my new blog. I’m just getting this new blog going, so stay tuned for more. Subscribe below to get notified when I post new updates.
This is an example post, originally published as part of Blogging University. Enroll in one of our ten programs, and start your blog right.
You’re going to publish a post today. Don’t worry about how your blog looks. Don’t worry if you haven’t given it a name yet, or you’re feeling overwhelmed. Just click the “New Post” button, and tell us why you’re here.
Why do this?
The post can be short or long, a personal intro to your life or a bloggy mission statement, a manifesto for the future or a simple outline of your the types of things you hope to publish.
To help you get started, here are a few questions:
You’re not locked into any of this; one of the wonderful things about blogs is how they constantly evolve as we learn, grow, and interact with one another — but it’s good to know where and why you started, and articulating your goals may just give you a few other post ideas.
Can’t think how to get started? Just write the first thing that pops into your head. Anne Lamott, author of a book on writing we love, says that you need to give yourself permission to write a “crappy first draft”. Anne makes a great point — just start writing, and worry about editing it later.
When you’re ready to publish, give your post three to five tags that describe your blog’s focus — writing, photography, fiction, parenting, food, cars, movies, sports, whatever. These tags will help others who care about your topics find you in the Reader. Make sure one of the tags is “zerotohero,” so other new bloggers can find you, too.