{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"authorship_tag":"ABX9TyN3Q/23GpjZGPuoiUUxori3"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"markdown","source":["**PENNIES TO THE MOON 2 - Using R**\n","\n","Would a Bill Gates fortune in pennies be enough pennies to go from the earth to the moon and back when lined up next to each other?\n"],"metadata":{"id":"x-QLnWLDNhmd"}},{"cell_type":"code","execution_count":null,"metadata":{"id":"9MCdO9izMr-5"},"outputs":[],"source":["# What is the Distance to the Moon?\n","# moon_km is the distance to the moon in KM, do the conversions to get the distance to the moon in CM\n","moon_km <-\n","moon_m <- moon_km *\n","moon_cm <- moon_m *\n","moon_cm"]},{"cell_type":"code","source":["# How many pennies does Bill Gates Have?\n","# use an estimate from the internet to estabish how much money Gates has and convert to pennies\n","gates_usd <-\n","pennies <- gates_usd *\n","pennies"],"metadata":{"id":"tNObc8lJN7zp"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# What is the length of the penny path?\n","# use an estimte from the internet to establish the size of a penny\n","penny size <- #cm\n","penny_path <- pennies * penny_size\n","penny_path"],"metadata":{"id":"GSNjWHFyN_Sb"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# Does Gates have enough pennies?\n","penny_path > moon_cm * 2 #to the moon and back"],"metadata":{"id":"yB7ZMcsgOGT1"},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":["Use the code structure above to determine if Gates fortune can reach the moon andn back in both **nickles** and **dimes**."],"metadata":{"id":"Pi1QXMeaPh_o"}},{"cell_type":"code","source":["# Nickels"],"metadata":{"id":"6gSmW4b8PuwN"},"execution_count":null,"outputs":[]},{"cell_type":"code","source":["# Dimes"],"metadata":{"id":"6eQV4MB3PwAA"},"execution_count":null,"outputs":[]}]}