Skip to content

Commit 0275046

Browse files
Poprawki bieżące
1 parent 6841f11 commit 0275046

File tree

13 files changed

+46
-38
lines changed

13 files changed

+46
-38
lines changed

02_Hello_World/HelloWorld.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
print('Hello World')
1+
print('Hello World')

03_Zmienne_i_typy_danych/konwersje_i_typizacja.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
a = a+3 # Bład !!!!
77

8-
a = int(3)
8+
a = int("3")
99

1010
a
1111

04_Instrukcje_warunkowe/if.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,14 @@
3030
print("Innej opcji nie ma")
3131

3232
# := "Walrus" operator
33-
if i := int(input("podaj liczbę naturalną")) % 2 == 0:
33+
if (i := int(input("podaj liczbę naturalną"))) % 2 == 0:
3434
print(f'{i} jest parzyste')
3535
else:
3636
print(f'{i} jest nieparzyste')
37+
38+
i = int(input("podaj liczbę naturalną"))
39+
suma_cyfr = (i % 10 + i // 10)
40+
if (suma_cyfr % 7 == 0) and (i % 2 == 0):
41+
print(f'Dobra liczba')
42+
else:
43+
print(f'Zła liczba')

05_Petle/input.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
n = int(input("Podaj liczbę:"))
2-
print(f'Podałeś liczbę {n}')
1+
n = int(input("Podaj liczbę:"))
2+
print(f'Podałeś liczbę {n}')

05_Petle/while.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
break
2525
print(f'{n} tak')
2626

27-
2827
n = 8
2928
while n > 0:
3029
n -= 1
@@ -47,4 +46,5 @@
4746

4847
print(f'{n} tak')
4948
else:
50-
print('Koniec')
49+
print('Koniec')
50+

06_Lancuchy_znakow/arytmetyka.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@
1515
s * 3
1616

1717
"Python" > "Java"
18-
s == "Ala"
18+
s == "Ala"
19+
20+
"10" < "2"

06_Lancuchy_znakow/funkcje.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,7 @@
2525
n = napis.find('k')
2626
napis[n:n+3]
2727

28-
28+
napis = "ala ma kota"
29+
napis = napis.title().replace('Ala', 'Tomek')
30+
napis
2931

07_Listy/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@
2121
---
2222
# Zadanie
2323
- stwórz pętle pobierającą napisy z wejścia aż do napotkania pustego napisu; wypisz listę posortowaną alfabetycznie wczytanych napisów
24-
- stwórz pętle pobierającą liczby z wejścia aż do napotkania pustego napisu; wypisz pierwszą parzystą
24+
- stwórz pętle pobierającą liczby z wejścia aż do napotkania pustego napisu; wypisz ostatnią parzystą

07_Listy/sortowanie.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
str(lista)
1313

1414
dluga_lista = [ str(i) for i in range(21)] + [ str(i) for i in range(-1, -21, -1)]
15-
str(dluga_lista)
15+
str(dluga_lista)
16+
dluga_lista.sort(key=int)

09_Slowniki/slowniki.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,12 @@
2828
for k in s.items():
2929
print(k)
3030

31+
for k, v in s.items():
32+
print(k, v)
33+
3134
nazwy_jednosci = {0: "", 1: "jeden", 2: "dwa", 3: "trzy", 4: "cztery", 5: "pięć", 6: "sześć", 7: "siedem", 8: "osiem",
3235
9: "dziewięć"}
33-
nazwy_jednosci.get(7)
36+
nazwy_jednosci.get(7, 'tej liczby nie znam')
3437

3538
n = 3
3639
if n == 1:
@@ -49,7 +52,9 @@
4952
s2 = {'d': 4}
5053
s|s2
5154

52-
s+={'e':5}
55+
s|={'e':5}
5356
s
5457

55-
'a' in s
58+
'a' in s
59+
60+
s = {1: "a", 2: 'b', "ala": [3, 4]}

11_Listy_i_zbiory-zaawansowane_mechanizmy/list_comprehension.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,21 @@
22

33
list(range(10))
44

5-
(x*x for x in range(10))
5+
(x * x for x in range(10))
66

7-
[ x for x in range(10)]
7+
[x for x in range(10)]
88

9-
[ x*x for x in range(10)]
9+
[x * x for x in range(10)]
1010

11-
[ x for x in range(10) if x % 2 == 0 ]
11+
[x for x in range(10) if x % 2 == 0]
1212

13-
[ x*x for x in range(10) if x % 2 == 0 ]
13+
[x * x for x in range(10) if x % 2 == 0]
1414

15-
[(x, y, x*y) for x in range(3) for y in range(4)]
15+
[(x, y, x * y) for x in range(3) for y in range(4)]
1616

17-
{ x for x in range(10)}
17+
{x for x in range(10)}
1818

19-
{ x//2 for x in range(10)}
19+
{x // 2 for x in range(10)}
20+
21+
{x: x * x for x in range(10) if x % 2 == 0}
2022

21-
{ x:x*x for x in range(10) if x % 2 == 0 }

12_Wyjatki_i_obsluga_bledow/input_error.py

-10
This file was deleted.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# Szkolenie z języka programowania Python
22

3-
---
4-
Repozytorium szkolenia: https://github.com/MichalKorzycki/Python-2023
5-
63
---
74

85
__Michał Korzycki__ - Wykładowca, Data Scientist z wyboru, Pythonista z zamiłowania, miłośnik zwinnych metodologii. Dwudziestoletnie doświadczenie jako architekt oprogramowania. Buduję systemy sztucznej inteligencji do wspomagania decyzji biznesowych.
96

7+
---
8+
Repozytorium szkolenia: https://github.com/MichalKorzycki/Python-2023
9+
1010
---
1111
Moje streamy na YT: https://www.youtube.com/@BitsofData/streams
1212
- Repo do streamów: https://github.com/Bits-of-Data-PL/PythonDataScience
1313

1414
---
15-
Python - popularność
15+
Python - popularność:
1616

17-
- [Tiobe Index](https://pypl.github.io/PYPL.html)
17+
- [Tiobe Index](https://www.tiobe.com/tiobe-index/)
1818
- [PYPL PopularitY of Programming Language Index](https://pypl.github.io/PYPL.html)
1919

2020
Python - linki:

0 commit comments

Comments
 (0)