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



Download 2,61 Mb.
bet28/200
Sana20.06.2022
Hajmi2,61 Mb.
#681748
1   ...   24   25   26   27   28   29   30   31   ...   200
Bog'liq
Python Projects for Beginners A Ten Week Bootcamp Approach to Python

MONDAY EXERCISES


  1. Output: print out your name.

  2. Type Checking: Try checking the type of a value by using the type() method. This will always print out what kind of data type you’re checking. This is useful to check data types when you’re unsure. As an example:

>>> type(int) # will output

Today, we focused on the four essential data types in python. Understanding the difference between each is key as we move forward. In tomorrow’s lesson, we will begin to understand how to save these data types to be used later in the program.
Tuesday: Variables
Variables are one of the most important beginner-level concepts in programming. They allow us to save values into memory using a name that we assign. This lets us use those values later in the program. Yesterday’s lesson covered different data types, but what if you wanted to save one of those data types to use later? This works like how we store information in our brain, variables are stored in computer memory, and we can access them later by referencing the name we used. I won’t go into the theory behind how Python stores information, as we’re focusing more on the application of programming, but it’s worth noting that Python automatically handles memory storage and garbage collection for us.
To follow along with this lesson, let’s continue from our previous notebook file
Week_02” and simply add a markdown cell at the bottom that says “Variables.

How They Work


We declare a name on the left side of the equals operator (“=”), and on the right side, we assign the value that we want to save to use later. Take the following example (no need to write this):
>>> first_name = "John"
When you create a variable, the line where you assign the value is a step called declaration. We’ve just declared a variable with a name of “first_name” and assigned it the value of the string data type “John”. This string is now stored in memory, and we’re able to access it by calling the variable name “first_name”.
Note Variable names can contain only letters, underscores, and numbers; however, they cannot start with a number.

Download 2,61 Mb.

Do'stlaringiz bilan baham:
1   ...   24   25   26   27   28   29   30   31   ...   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