summaryrefslogtreecommitdiff
path: root/sample_notebooks/AbhishekGupta/chapter16.ipynb
diff options
context:
space:
mode:
authorhardythe12015-07-03 12:23:43 +0530
committerhardythe12015-07-03 12:23:43 +0530
commit9d260e6fae7328d816a514130b691fbd0e9ef81d (patch)
tree9e6035702fca0f6f8c5d161de477985cacad7672 /sample_notebooks/AbhishekGupta/chapter16.ipynb
parentafcd9e5397e3e1bde0392811d0482d76aac391dc (diff)
downloadPython-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.gz
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.tar.bz2
Python-Textbook-Companions-9d260e6fae7328d816a514130b691fbd0e9ef81d.zip
add/remove books
Diffstat (limited to 'sample_notebooks/AbhishekGupta/chapter16.ipynb')
-rwxr-xr-xsample_notebooks/AbhishekGupta/chapter16.ipynb108
1 files changed, 108 insertions, 0 deletions
diff --git a/sample_notebooks/AbhishekGupta/chapter16.ipynb b/sample_notebooks/AbhishekGupta/chapter16.ipynb
new file mode 100755
index 00000000..9a6c8320
--- /dev/null
+++ b/sample_notebooks/AbhishekGupta/chapter16.ipynb
@@ -0,0 +1,108 @@
+{
+ "metadata": {
+ "name": "",
+ "signature": "sha256:5681cda1a39ee67e447ba1a84903896a8e1196df60e583969d262ff3e357d1cb"
+ },
+ "nbformat": 3,
+ "nbformat_minor": 0,
+ "worksheets": [
+ {
+ "cells": [
+ {
+ "cell_type": "heading",
+ "level": 1,
+ "metadata": {},
+ "source": [
+ "Chapter16:WIRELESS WANs: CELLULAR TELEPHONE\n",
+ "AND SATELLITE NETWORKS"
+ ]
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex16.1:pg-479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#example1\n",
+ "#calculate the period of the Moon\n",
+ "\n",
+ "C=1.0/100;\n",
+ "dist_moon=384000; # 384,000 km\n",
+ "radius_earth = 6378; # 6378 km\n",
+ "distance=dist_moon+radius_earth ;# total distance in km\n",
+ "Period=C*((distance)**1.5); #formula\n",
+ "month=round(Period/2592000); # 1 month = 60*60*24*30=2592000 seconds\n",
+ "print\"The period of the Moon, according to Keplers law is\",round(month)\n",
+ "\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "The period of the Moon, according to Keplers law is 1.0\n"
+ ]
+ }
+ ],
+ "prompt_number": 13
+ },
+ {
+ "cell_type": "heading",
+ "level": 2,
+ "metadata": {},
+ "source": [
+ "Ex16.2:pg-479"
+ ]
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [
+ "#example2\n",
+ "#calculate of the period of the satellite\n",
+ "C=1.0/100;\n",
+ "orbit=35786; # 35,786 km\n",
+ "radius_earth = 6378; # 6378 km\n",
+ "distance=orbit+radius_earth ;# total distance in km\n",
+ "Period=C*((distance)**1.5); #formula\n",
+ "hour=round(Period/3600); # 1 hour = 60*60=3600 seconds\n",
+ "print\"According to Keplers law, the period of the satellite is\",floor(Period),\"s or \",hour, \"hours.\"\n",
+ "print\"\\nThis means that a satellite located at\", orbit,\"km has a period of \",hour,\"h, which is the same as the rotation period of the Earth.\\nA satellite like this is said to be stationary to the Earth. The orbit is called a geosynchronous orbit.\"\n"
+ ],
+ "language": "python",
+ "metadata": {},
+ "outputs": [
+ {
+ "output_type": "stream",
+ "stream": "stdout",
+ "text": [
+ "According to Keplers law, the period of the satellite is 86579.0 s or 24.0 hours.\n",
+ "\n",
+ "This means that a satellite located at 35786 km has a period of 24.0 h, which is the same as the rotation period of the Earth.\n",
+ "A satellite like this is said to be stationary to the Earth. The orbit is called a geosynchronous orbit.\n"
+ ]
+ }
+ ],
+ "prompt_number": 14
+ },
+ {
+ "cell_type": "code",
+ "collapsed": false,
+ "input": [],
+ "language": "python",
+ "metadata": {},
+ "outputs": []
+ }
+ ],
+ "metadata": {}
+ }
+ ]
+} \ No newline at end of file