{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example - 01 - Hello World!" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In this 'hello world' program, you will learn to use AMAT to create a planet object." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "First let us import the Planet class from AMAT" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from AMAT.planet import Planet" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now let us create a planet object which represents Venus." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "planet = Planet(\"VENUS\")" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us look at the an attribute of the created object. For example let us, print the radius of the planet. A full list of attributes and functions can be obtained using help(planet)." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "6051800.0\n" ] } ], "source": [ "print(planet.RP)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "**Congratulations!** You have now created a planet object using AMAT. In the next example, we will add an atmosphere model to this planet object." ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.3" } }, "nbformat": 4, "nbformat_minor": 2 }