Python Projects for Beginners a ten-Week Bootcamp Approach to Python Programming



Download 2,61 Mb.
bet20/200
Sana20.06.2022
Hajmi2,61 Mb.
#681748
1   ...   16   17   18   19   20   21   22   23   ...   200
Bog'liq
Python Projects for Beginners A Ten Week Bootcamp Approach to Python

Step 1: Open Terminal
We need to open terminal and “cd” into our “python_bootcamp” directory:

$ cd desktop/python_bootcamp

Step 2: Writing the Jupyter Notebook Command
Opening Jupyter Notebook through the terminal is as simple as typing the name of the tool:

$ jupyter notebook

Be sure that you are in the proper directory before typing the code; otherwise it will open wherever your terminal directory is currently located. Often, this will open Jupyter Notebook up in your user folder. Jupyter Notebook will open in your browser.

Creating a Python File


Anytime we start a new week, we’ll end up creating a new file to work from. To do so, it’s simple; just click the “New” button on the right side of the screen when Jupyter Notebook first opens. Then select “Python 3” (see Figure 1-5).
GettinG Started

Figure 1-5. Creating a Python 3 notebook
Once you click the “Python 3” option, a new tab will open as this file. Click the name at the top to rename it, and let’s name this file “Week_01” (see Figure 1-6).

Figure 1-6. Changing the file name

Jupyter Notebook Cells


Now that we’ve opened up Jupyter Notebook and created a file that we can work with, let’s talk about cells. I’m not talking about biology; rather, in this notebook you’ll notice the empty white rectangle section below the tools (see Figure 1-7). These are known as
cells.”

Figure 1-7. Notebook cells highlighted in red
Each cell is where we can write our code, or even use the Markup language. Let’s write some markup to begin with.

  1. Click in the first cell, so the surrounding area glows blue.

  2. In the toolbar, you’ll notice a drop-down menu that says “code.” Click the drop-down, and select “markdown” instead.

  3. Within the cell write the following:


# Week 01

Note When writing markup, the number of hashtags in a row relates to the size of the heading. Like htML header tags.

  1. Let’s now run the cell to execute the code. To do this, you hold shift and press enter (the cell must be selected).

  2. When you use shift + enter, a new cell will appear below the current one.

Within this newly created cell, let’s go ahead and write a simple line of Python to see how the output works. Let’s go ahead and write the following:

# this is python print("Hello, buddy!")

Go ahead and run the cell. It will run all the code within the cell and output the result. Again, don’t worry about the actual Python, this lesson is about how Jupyter Notebook cells run.
For the rest of this book, we’ll be writing our code inside of Jupyter Notebook files. I’ll be using markdown to specify certain sections, so be sure you’re comfortable with running cells, writing markdown, and creating a new Jupyter Notebook file before moving on.
GettinG Started
today we learned how to use Jupyter notebook and what we can do with cells. in tomorrow’s lesson, we’ll build our first python application!

Download 2,61 Mb.

Do'stlaringiz bilan baham:
1   ...   16   17   18   19   20   21   22   23   ...   200




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish