.py extension (short for Python)ipython, then press Enter (or Return)Python 3.7.0 | packaged by conda-forge | (default, Jan 20 2019, 17:24:52)
Type 'copyright', 'credits' or 'license' for more information
IPython 6.5.0 -- An enhanced Interactive Python. Type '?' for help.
In [1]:
In [1]:" is a prompt, indicating that IPython is waiting for your input? for help or begin entering snippets, as you’ll do momentarily45 + 72
45 + 72 and press Enter, IPython Out[1]In [2] prompt to show that it’s waiting for you to enter your second snippet5 * (12.7 - 4) / 2
*) for multiplication and forward slash (/) for divisionOut[2]5, 4 and 2, are called integers12.7, 43.5 and 21.75, are called floating-point numbers exit and press Enter to exit immediatelyRollDieDynamic.py that you’ll write in Chapter 6.py extension indicates the file contains Python source codeRollDieDynamic.py simulates rolling a six-sided die, presenting a colorful animated visualization that dynamically graphs the frequencies of each die faceexamples folder to your user account’s Documents folderch##, where ## is a two-digit chapter number from 01 to 17cd (“change directory”) command to change to the ch01 folder:cd ~/Documents/examples/ch01, then press Entercd C:\Users\YourAccount\Documents\examples\ch01, then press Enteripython RollDieDynamic.py 6000 1
6000 and 1 tell this script the number of times to roll dice and how many dice to roll each time6000 times for 1 die at a time
ch01 examples folder in your Terminal, shell or Anaconda Command Prompt, the executejupyter lab
ch01 folder’s contents in the File Browser tab 
http://localhost:8888/lab
Untitled.ipynb.ipynb is short for IPython Notebook—the original name of the Jupyter NotebookUntitled.ipynb as TestDrive.ipynb: Untitled.ipynb tab and select Rename Notebook….TestDrive.ipynb and click RENAME.
[ ]: is where the Jupyter Notebook will display the cell’s snippet number after you execute the cell45 + 72


5 * (12.7 - 4) / 2

TestDrive.ipynb notebook to remove its output and snippet numbers
TestDrive.ipynb tab’s X button to close the notebookTestDrive.ipynb notebook again now©1992–2020 by Pearson Education, Inc. All Rights Reserved. This content is based on Chapter 1 of the book Intro to Python for Computer Science and Data Science: Learning to Program with AI, Big Data and the Cloud.
DISCLAIMER: The authors and publisher of this book have used their best efforts in preparing the book. These efforts include the development, research, and testing of the theories and programs to determine their effectiveness. The authors and publisher make no warranty of any kind, expressed or implied, with regard to these programs or to the documentation contained in these books. The authors and publisher shall not be liable in any event for incidental or consequential damages in connection with, or arising out of, the furnishing, performance, or use of these programs.