{"id":1247,"date":"2023-02-14T11:30:39","date_gmt":"2023-02-14T10:30:39","guid":{"rendered":"https:\/\/informatykachelm.pl\/?p=1247"},"modified":"2023-02-14T12:07:30","modified_gmt":"2023-02-14T11:07:30","slug":"python-ciagi-plus-konwersja","status":"publish","type":"post","link":"https:\/\/informatykachelm.pl\/?p=1247","title":{"rendered":"Python &#8211; ci\u0105gi plus konwersja"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:33.33%\"><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:66.66%\">\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-e107fdc1-fccb-43c0-9321-cef6f88a9f74\" href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/wstep.pdf\">wstep<\/a><a href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/wstep.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-e107fdc1-fccb-43c0-9321-cef6f88a9f74\">Pobierz<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-af1e9fb6-6b33-488a-8de0-9e96cd6f62d7\" href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/wstep.txt\">wstep<\/a><a href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/wstep.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-af1e9fb6-6b33-488a-8de0-9e96cd6f62d7\">Pobierz<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-63a42d57-7f6d-490b-9888-f844fce5f3bc\" href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/ciagi.pdf\">ciagi<\/a><a href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/ciagi.pdf\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-63a42d57-7f6d-490b-9888-f844fce5f3bc\">Pobierz<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-9dca1d18-5dcd-4e24-97be-03f5964a085e\" href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/ciagi.txt\">ciagi<\/a><a href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/ciagi.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-9dca1d18-5dcd-4e24-97be-03f5964a085e\">Pobierz<\/a><\/div>\n\n\n\n<div class=\"wp-block-file\"><a id=\"wp-block-file--media-d62e1166-44ae-4a29-8916-9dfe70ef3038\" href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/bledne.txt\">bledne<\/a><a href=\"https:\/\/informatykachelm.pl\/wp-content\/uploads\/2023\/02\/bledne.txt\" class=\"wp-block-file__button wp-element-button\" download aria-describedby=\"wp-block-file--media-d62e1166-44ae-4a29-8916-9dfe70ef3038\">Pobierz<\/a><\/div>\n<\/div>\n<\/div>\n\n\n\n<p>Konwersja pomi\u0119dzy systemami. Po konwersji otrzymamy przedrostek &#8211; lstripem go obcinamy.<\/p>\n\n\n\n<p><code>liczba = 43242<\/code><\/p>\n\n\n\n<p><code>liczba_bin = bin(liczba).lstrip('0b')&nbsp;&nbsp;&nbsp; <\/code><\/p>\n\n\n\n<p><code>liczba_oct = oct(liczba).lstrip('0o')&nbsp;&nbsp;&nbsp; <\/code><\/p>\n\n\n\n<p><code>liczba_hex = hex(liczba).lstrip('0x')&nbsp;&nbsp;&nbsp; <\/code><\/p>\n\n\n\n<p>Je\u017celi zamieniamy na 10, to robimy funkcj\u0105 int(liczba, system z kt\u00f3rego zamieniamy), np. int(&#8217;1110001&#8242;, 2)<\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12],"tags":[],"class_list":["post-1247","post","type-post","status-publish","format-standard","hentry","category-kp2","category-kp3","entry"],"_links":{"self":[{"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/posts\/1247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1247"}],"version-history":[{"count":4,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/posts\/1247\/revisions"}],"predecessor-version":[{"id":1261,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/posts\/1247\/revisions\/1261"}],"wp:attachment":[{"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1247"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1247"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}