Python Programming for Biology: Bioinformatics and Beyond



Download 7,75 Mb.
Pdf ko'rish
bet11/514
Sana30.12.2021
Hajmi7,75 Mb.
#91066
1   ...   7   8   9   10   11   12   13   14   ...   514
Bog'liq
[Tim J. Stevens, Wayne Boucher] Python Programming

Interpreting commands

So, to our first practical point; to get the Python interpreter to do something we will give it

some  commands  in  the  form  of  a  specially  created  piece  of  text.  It  is  possible  to  give

Python  a  series  of  commands  one  at  a  time,  as  we  slowly  type  something  into  our

computer. However, while giving Python instructions line by line is useful if you want to



test out something small, like the examples in this chapter, for the most part this method of

issuing commands is impractical. What we usually do instead is create all of the lines of

text  representing  all  the  instructions,  written  as  commands  in  the  Python  language,  and

store the whole lot in a file. We can then activate the Python interpreter program so that it

reads all of the text from the file and acts on all of the commands issued within. A series

of  commands  that  we  store  together  in  such  a  way,  and  which  do  a  specific  job,  can  be

considered as a computer program.

1

If you would like to try any of the examples given in



the  book  the  next  chapter  will  tell  you  how  to  actually  get  started.  The  initial  intention,

however, is mostly to give you a flavour of Python and introduce a few key principles.

mass = 5.9736

volume = 1.08321

density = mass/volume

print(density)



An example of a very simple, four-line Python program that performs a calculation and displays the

result.


Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   7   8   9   10   11   12   13   14   ...   514




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