Algorithms For Dummies


PART 1   Getting Started



Download 7,18 Mb.
Pdf ko'rish
bet157/651
Sana15.07.2021
Hajmi7,18 Mb.
#120357
1   ...   153   154   155   156   157   158   159   160   ...   651
Bog'liq
Algorithms

 

   


  PART 1 

 Getting Started

Creating and Using Strings

Of all the data types, strings are the most easily understood by humans and not 

understood at all by computers. A string is simply any grouping of characters you 

place within double quotation marks. For example, 

myString = "Python is a 

great language."

 assigns a string of characters to 

myString


.

The main reason to use strings when working with algorithms is to provide user 

interaction — either as requests for input or as a means of making output easier 

to understand. You can also perform analysis of string data as part of working 

with algorithms, but the computer doesn’t actually require strings as part of its 

sequence of steps to obtain a solution to a problem. In fact, the computer doesn’t 

see letters at all. Every letter you use is represented by a number in memory. For 

example,  the  letter  A  is  actually  the  number  65.  To  see  this  for  yourself,  type 



ord("A") at the Python prompt and press Enter. You see 65 as output. You can 

convert any single letter to its numeric equivalent using the 

ord()

 command.



Operator

Description

== !=

Equality operators.



= %= /= //= -= += *= **=

Assignment operators.

is

is not


Identity operators.

in

not in



Membership operators.

not or and

Logical operators.


Download 7,18 Mb.

Do'stlaringiz bilan baham:
1   ...   153   154   155   156   157   158   159   160   ...   651




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2025
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