{"id":2603,"date":"2026-10-01T20:33:09","date_gmt":"2026-10-01T18:33:09","guid":{"rendered":"https:\/\/informatykachelm.pl\/?p=2603"},"modified":"2026-10-01T20:33:09","modified_gmt":"2026-10-01T18:33:09","slug":"petla-while-zadania-2","status":"publish","type":"post","link":"https:\/\/informatykachelm.pl\/?p=2603","title":{"rendered":"P\u0119tla while &#8211; zadania"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<!--more-->\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-8f761849 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<p class=\"wp-block-paragraph\">p\u0119tle while: <a href=\"https:\/\/www.flynerd.pl\/2019\/06\/python-8-petla-while.html\">https:\/\/www.flynerd.pl\/2019\/06\/python-8-petla-while.html<\/a><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Licznik (zwi\u0119kszanie warto\u015bci):<\/strong>Napisz program, kt\u00f3ry za pomoc\u0105 p\u0119tli <code>while<\/code> wypisze na ekranie kolejne liczby ca\u0142kowite od $1$ do $10$.<\/li>\n\n\n\n<li><strong>Suma wprowadzanych liczb (warunek stopu):<\/strong>Napisz program, kt\u00f3ry w p\u0119tli <code>while<\/code> prosi u\u017cytkownika o podawanie liczb ca\u0142kowitych i dodaje je do siebie. P\u0119tla ma si\u0119 przerwa\u0107, gdy u\u017cytkownik wpisze cyfr\u0119 $0$. Na koniec program wypisuje sum\u0119 podanych liczb.<\/li>\n\n\n\n<li><strong>Symulator PIN-u (sprawdzanie has\u0142a):<\/strong>Napisz program, kt\u00f3ry prosi u\u017cytkownika o podanie poprawnego kodu PIN (np. <code>1234<\/code>). P\u0119tla <code>while<\/code> powinna Pyta\u0107 o PIN tak d\u0142ugo, a\u017c u\u017cytkownik wpisze poprawny kod. Gdy wpisze poprawny, program wypisuje komunikat: <code>\"Dost\u0119p przyznany\"<\/code>.<\/li>\n\n\n\n<li><strong>Odliczanie w d\u00f3\u0142:<\/strong>Napisz program, kt\u00f3ry pyta u\u017cytkownika o liczb\u0119 pocz\u0105tkow\u0105 (np. $5$), a nast\u0119pnie za pomoc\u0105 p\u0119tli <code>while<\/code> odlicza w d\u00f3\u0142 do $1$ i na ko\u0144cu wypisuje napis <code>\"Start!\"<\/code>.<\/li>\n<\/ol>\n<\/div>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/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],"tags":[],"class_list":["post-2603","post","type-post","status-publish","format-standard","hentry","category-kp2","entry"],"_links":{"self":[{"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/posts\/2603","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=2603"}],"version-history":[{"count":1,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/posts\/2603\/revisions"}],"predecessor-version":[{"id":2607,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=\/wp\/v2\/posts\/2603\/revisions\/2607"}],"wp:attachment":[{"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/informatykachelm.pl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}