Pierwszy_projekt

Last updated: March 17th, 20202020-03-17Project preview
In [1]:
print ('hello world!')
hello world!
In [2]:
print (witaj świecie!)
  File "<ipython-input-2-fc71fd1b5a31>", line 1
    print(witaj świecie!)
                      ^
SyntaxError: invalid syntax
In [3]:
print ("witaj świecie!")
witaj świecie!
In [4]:
print (123)
123
In [5]:
print (2 + 2)
4
In [6]:
print('2 + 2')
2+2
In [8]:
# tu może być zupełnie cokolwiek
# print (666)
In [9]:
print ('blablabla') #print (123123)
blablabla
In [10]:
2 + 2
Out[10]:
4
In [11]:
2 + 2
6 + 13
Out[11]:
19
In [12]:
print (2 + 2)
print (6 + 13)
4
19
In [13]:
2 - 2
Out[13]:
0
In [14]:
2 * 2
Out[14]:
4
In [15]:
2 * 123
Out[15]:
246
In [16]:
13 / 5
Out[16]:
2.6
In [17]:
2,6 * 5
Out[17]:
(2, 30)
In [18]:
2.6*5
Out[18]:
13.0
In [19]:
2 ** 8
Out[19]:
256
In [20]:
10 ** 3
Out[20]:
1000
In [21]:
10 ** 100
Out[21]:
10000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
In [22]:
4 ** (1/2)
Out[22]:
2.0
In [23]:
10 % 3
Out[23]:
1
In [24]:
10 % 4
Out[24]:
2
In [25]:
10 % 5
Out[25]:
0
In [26]:
10 // 4
Out[26]:
2
In [27]:
10 % 4
Out[27]:
2
In [1]:
imie = 'krzysztof'
In [2]:
wiek = 33
In [3]:
imie
Out[3]:
'krzysztof'
In [4]:
wiek
Out[4]:
33
In [5]:
wiek * 2
Out[5]:
66
In [6]:
imie * 2
Out[6]:
'krzysztofkrzysztof'
In [7]:
'ATCG' * 10 ** 3
Out[7]:
'ATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCGATCG'
In [8]:
import numpy as np
In [9]:
wiek * 2
Out[9]:
66
In [10]:
wiek = '33'
In [11]:
wiek * 2
Out[11]:
'3333'
In [12]:
'krzysztof' * 3
Out[12]:
'krzysztofkrzysztofkrzysztof'
In [13]:
'krzysztof' * 'inny napis'
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-13-c291288f3200> in <module>
----> 1 'krzysztof'*'inny napis'

TypeError: can't multiply sequence by non-int of type 'str'
In [14]:
wiek = 33
wiek = wiek + 1
print (wiek)
34
In [19]:
wiek = wiek + 1
wiek
Out[19]:
39
In [20]:
import this
The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
In [21]:
imie = 'krzysztof'
In [22]:
type(imie)
Out[22]:
str
In [23]:
wiek = 33
In [24]:
type(wiek)
Out[24]:
int
In [25]:
wiek = 32.5
type(wiek)
Out[25]:
float
In [26]:
11 ** 1000 * 11 **10000
Out[26]:
20870686784305440374922322616825541717433056115888222244861869879300203065917268443629878311079126856384657373760129636047715139764841377429283964517956347346130327688566731651798318907248542597408311272277338382056142319425723146229215722331495948651788764713707000491102373375950783167786538243745148938241892103675468492264529921385252973700579740190306559746578425687172008308841641743320548347721760759483108450517160489936296849785332490345869929247044543036427520683937626124025229191984742725606172689358968151913385917808860810017604873811221058240814363746519650466620958492314946008246719529016408425066131890291305335512667521778018672001507890575946006271255457920163315529627402571513100504349452014281206073469590826890610619046491028131569064471718197333335457230708304313365928466551740058967359617074407940530215733121074243884642128036214036672671811574081342365634109944463054938986983593597766098890756534216225329409171459779355643325314980797349961754216188246065326227843234571360798712002545833918521026450508037136539619507161455014532966700970158177600890295003267977274799062623453802245089248787936072107802892020766837986474719559265339626918357990572983831062802148712434173517767606345206995926679010832603691185916449851515020888287416654563566008714015609872411407111735147932747141298380630978832250558800248595100076537551827598096071543944381817899597456718734428801957816326823324834571569287395780643540908900915583699299576429021952065643880303486608990813493856410907698939208736682179410335280589546985910179883938095629331638565457035466101481539656027145993008533353600165892774226463098025554122536901023977174725927795206090153202476973193536691434610907325142978699355085413379015377727625640534424110943660425168662571385616290528910559785721789122136771412205285566774872374238185808881120789397447150524691491518332408847794336117366544529805991852146593550055185429234292086632144934812848685911628375069487920904571468605853224842320086475644262502609408847380052175031004475680394985644615963115665892402470850678856058632841350927642139684721485010997999789670687439853832144142646828105543959037043454125525741249007518009234168009225840618830155862128757123920249615517329726504236957553859348550076312276552608074826942435780516282262355653675431562756532863882963112460071708505245477845978200030824903980006848967672440199964611334528749402016761107809761038873871395386714994336902062555035005034097134233138997440502646087661608666065244646616993722707212643370582822629454006467390785338396779982903898488870424560044026169329360651761660289708693510678969056889935126092784712409260503187957201321961350070804224239148885629403310552367031114011687058022854765382598861590719492487655182175262887725877948097048486549267601669048544713024166716251043625732040027004287692827443742322682970255026778172518927412723961601666917028977135896468708991926847534637743543940474689126212047068090346490042327447759583863766033628367353070635850447542343621898789204219704866509673777818231129980878569874884333219570788873550194443023579412834810271978906374665371586638019042396560328073853144579363175921387435823082277138021429926972225479113336765177018575331439443069231878002795245961845026661837042842286897868605989240501635091325751223476010231103555928329578949390698486286311593145037879515737005576945712755254375457391586826860688051391216650339706674379073277153371851033281569927563418562352051357387956306210884172786582280938925743608241912786129922434672804310205217082615392382456111459908154739936958742709437407799724327733831000961462973246898671338233486957132924311334396395676776941431484813379825635710604814540580824074893153074302496338018128989695287008555884498550684507614778720401389156133358080927852840402394892100835130817805244831596646543228813737942530810985803867998893880838396882588712045431993302528167570474972785966918984748604191414554676253318079755641612014566971624956540962828223956106625122603350620108595393490666876754033194624198682007182158645227501347039132237232358137130445930457777607854102706828191869694888132852265839007883122896290294389935049938247211592918673444038742131822083003497296095644510237075491472211059855903169068300497876269213897807726124928168408206026827266546932030356473891632921068197179323592330621899714755663576014725326502349361189305292352758318390817921922610943956748573811466514675028502737138429478879401873311098980132866384649457360194487667230272161038281470036618477333892243526708627314699570655365390673544009495297550364229642338529640578367683891378803008142179605028855607358659449897747911613678632569469112721020113816515274347440990180028907730724512768212925935881636869300504161971893539414424897770364597470639166176796727778535749061138402657404024121681886596091195530282516498937067539725426394557198794150545508450258668119383058613590397148717546070614257015033870494335719107139332004425007675716746830876507882133196557314793684173628552275373746770065585433590777794650679804795427187997818203641670691143156322758458157210046312322053847765830887731194341166223736352271317256291928476401426932446635876397876029055697611304526317537998395377822271058588459315537296697962460255759560779241484708842335805678728374118970491356338607994838138773105621374836680972287130970964548521677067992935185276469921500527004821898282242381948211704615856668925331835353567399593095157656797161432920541866380519830848041387488126642531717925245890647702394611262815697975057108152359649337289067060115259770342966438351872047952066778887665446168111599089272582374987796897234853649683637453487310883983176165780251168048087054469467317848704566113312890890179321408446222394935987541588015488354270052047592027922949628117330465534587667898109232524887803030374082966904376657404854079851062340715283389963157325962864197466412137811437893514661787539889879985888512140881678021450184302324778230542686315191807777513570686195711641969171594327943543264059463758184991775944613378243394995942767326273751242794752717045326626118034360105113657118475808289198118953452672462772178136686118630458252148136453540920118683684328687229202815893922983395099330526861366199456054351569981776105576329330988256256407564740086569705931492121604370854625257261903880446193178665882279987384886421836700487718711060395388299812757722795536693853977345429168132124746603192156822677658076442552148950166753917508116922947645092836206951904711964212422551017671440810432470285598689935315905075470029186943541784594532977743796280087018185743766413309538709026340470946727596451440929895754435122621328129202506960269973884699092998232032422679087509142454138874376909101452555297689594282028338959467690859836102764384203167533824037637521716882113798498071071367608576548035447798511962301226084550201364100430630250421803332890193246095528749877259249687832711227408766950055745300880060055411479822610480980508309865602888777459740140185680400263750309389441579691429036175373870072246975000212693146273229044936779341033492511563244999371592897892771048137044489018997361137630917319715139212357174198342205582129113693258120002468911280470626334567536285343840493945560319054107706428834324060485965333493142282101539223363905183705242751208385423865983512478193979630598592718701610348344757401176038930642255913902413046426127769188276816191376635066327137454046738181818068135998290463922402178204455480701322478929387372538179656033028853789262440675305469573475720242876034633675020987221536723468282631487950183043473249917640199182981394671294554470728543926364448728347667148051759391772002864417074524847458317993638783694139019048355267651271963017929161995296917319471756871264970102729871203247427501238529397835148187269507257360644817313352671976526551488649837032926756723769165669263945558032324254256987875793498651081203630291880769034230956222400905893706774708792925556386588433426560380144418734152411648125556663349329335846377337580644481680207178496115435092500115888658631340765365350326170267482726073297282865753721783066989729121084206712892747795345090128100922969401002781942712279631161086056760527011421698622263285867806653481139167271214454940233704108859154684820209427441080595473407310056283881740685435191254099769099247614260103197583821827995087921224852841276806384676484888686623769174572882412432081953916757378082658618148106612996581143250933291008380408738833638444517677556487581519063813857920892026648773162700292487433469793569454406112530771729742978793114037184508651576424585927142049106170955235075694539981238056854324463017263041840582825352731061257744924203131674977731040025318282144974947499185469775093281349636044500257575472100505026930152748008554983053926795925299956400277144006377281432974276932983286426316902489863571563735950454320612281315823409316054789366253657096574242230291492285382661840502202032427315538401387921755164243351478102429830943114845053857099510859689903794630210158068471445805940571644082343052304957021972112514370217582561181939207413265689861958662879070456626675614793046689558558033814334007494782164717249573594798203537202376056104888742088556211044467058617940210648478993470951566327702347491593481925586618901790950911865666098944733263903052192195102384014799662702490805782173443564308397986980419205337044116321375150703418843949682770393425964630817038563767811927621557336266465379356187589195142153810852993646699230849253149277045079954752317905688651292332943113880049591766393242636214233453177052661689589310502639930439639452080507077361618248302199832874474919287909202643061570229030842265003161841399124889262790198100490283641486269345634411841298611723356110844709558183305968383775251946214850123712840619732970699862060804716039882581018262073370743875747196621421089261254180015591291400192543258755494940930267498730413897634262228745148554334295087211302110477867578426698204294425917057682355104949885739215377378225063369688036600714604672016483593523804530213066441994159228229659730332622931696312662744082799335222385050377454894594612239790224992934609709729501736249435263311792267267653146069980345450270230755951073449266990338920858671828143978051042160768556999249388616285369719090026062665572406127488287497342180302590956339172001020307053940702915612056099894126906709136327496678235080683648579766076834288142274467802740165096632037768517895579587371503538417095355188309779051006493372649796829531253893243118836163387375228019087866804590441144206993917729556286916335291541830905899053940363110996463147133920889535879010183198208796306248634436885628887707954136417852432276460829515682143595613764513345919063912639718411850255408380720829387842372381889314922724964359011506371833872428437527939728595366489632479808184710551632015322842357666332481512515331742842838495702056564060237323670925023455013941015798209065661273012825492793453542393088763919291421236859769946441359324187511646666180213380994565440034292199594493784024790439049058765004122820397076539660299064247225323523980563899240429508849204586345886804562640064146432364002801008256419853116590491375302213107038776824194258425404753372609215256184682410174725063838560647989736110448526082465289008343665609627620810781795383441674011820494378342404693580190995423698536565978651351180315126971378906271732593193605510388435423794204854738098386377759658500426967776800178499329060001
In [32]:
wiek = 18 + 5 + 2 + 4 + 3
In [30]:
'mój wiek to ' + str(wiek)
Out[30]:
'mój wiek to32'
In [33]:
wiek
Out[33]:
32
In [34]:
wiek = 33
wiek
Out[34]:
33
In [37]:
'33' + '23'
Out[37]:
'3323'
In [38]:
int('33') + int('23')
Out[38]:
56
In [39]:
wiek = '33'
In [40]:
int(wiek) + 23
Out[40]:
56
In [41]:
float(wiek)
Out[41]:
33.0
In [ ]:
 
Notebooks AI
Notebooks AI Profile20060