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



Download 2,61 Mb.
bet172/200
Sana20.06.2022
Hajmi2,61 Mb.
#681748
1   ...   168   169   170   171   172   173   174   175   ...   200
Bog'liq
Python Projects for Beginners A Ten Week Bootcamp Approach to Python

CHALLENGE QUESTION


Imagine you’re a data analyst and you’ve just been handed a set of data that shows the number of accidents for all drivers, their ages, and the size of their engines. You need to figure out a way to display this information so that it tells a story. Normally you would create a graph with x, y, z coordinates; however, that can become complicated, and you don’t have time for that. How would you render the information so that it’s still considered 3-dimensional, but you can only use the x and y axis?

Monday: Virtual Environments and Requests Module
Today we’ll be learning all about virtual environments, why we need them and how to use them. They’re necessary for what we need to do this week, which is downloading and importing a few libraries to work with. We’ll also get into the requests module and cover APIs briefly.
For today’s lesson, we won’t be starting out in Jupyter Notebook; instead open the terminal and cd into the “python_bootcamp” folder if you haven’t already. If you have the terminal running Jupyter Notebook, be sure to stop it, as we need to write some commands in the terminal.
What Are Virtual Environments?
Python virtual environments are essentially a tool that allows you to keep project dependencies in a separate space from other projects. Most projects in Python need to use modules that are not included by default with Python. Now, you could simply download the modules (or libraries) into your Python folder to use; however, that could cause some issues down the road. Let’s say you’re working on two separate projects, where the first one uses Python version 2.7 and the second project uses Python version 3.5. If you try and use the same syntax for both, you’ll run into several issues. Instead, you would create two separate virtual environments, one for each project. This way both projects can run properly using the correct dependencies because of the personalized virtual environment.
CHapter 10 INtroduCtIoN to data aNalYsIs
Note When creating a virtual environment, a folder called “venv” will appear. this is where all the libraries that you download are saved. simply put, a virtual environment is not much more than a folder that stores other files.
As an analogy to understand virtual environments, first picture our own planet. Now think of it as an environment filled with grass, sun, clouds, air, etc. In the case of programming, Python would be like the planet, and the grass, sun, clouds, and air would be like libraries that you need to include in the environment. As Python does not come included with them, we would create a virtual environment to store these libraries so that we may import them into our project when needed. If you think of Mars, that would be another project, with a separate virtual environment specifically made for that program.
Virtual environments can often be a tough concept to grasp for anyone seeing it for the first time, so here’s another analogy. Imagine you’ve planned two vacations, one to the beach and the other to go skiing. Rather than using the same suitcase filled with mixed clothes, you’ve decided to pack two separate suitcases. The one for the beach will include a bathing suit, sunglasses, and flip-flops. The other suitcase will include a jacket, skiis, and boots. In the following, you can find the relationships within this analogy:

  • Vacations ➤ Projects

  • Suitcases ➤ Virtual Environments

  • Clothes and Accessories ➤ Project Dependencies/Files


Download 2,61 Mb.

Do'stlaringiz bilan baham:
1   ...   168   169   170   171   172   173   174   175   ...   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