Skip to content
Snippets Groups Projects
Commit ee2cc61a authored by Bodor Máté's avatar Bodor Máté
Browse files

v0.17

parent fc53258a
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,7 @@ Note: ...@@ -65,7 +65,7 @@ Note:
--- ---
### Miért szeretjük a python? ### Miért szeretjük a pythont?
Note: Note:
...@@ -83,6 +83,7 @@ Note: ...@@ -83,6 +83,7 @@ Note:
### Tökéletes?! ### Tökéletes?!
+++ +++
### Tökéletes?! ### Tökéletes?!
NEM! NEM!
...@@ -90,18 +91,20 @@ NEM! ...@@ -90,18 +91,20 @@ NEM!
+++ +++
### Tökéletes?! ### Tökéletes?!
- Lassú, nagyon lassú
- Zabálja a ramot
- Viszonylag lassú
- Nagy memóriaigény
Note: Note:
+++ +++
Kép: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/gpp-python3.html Kép: https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/gpp-python3.html
Note: Note:
https://en.wikipedia.org/wiki/N-body_simulation https://en.wikipedia.org/wiki/N-body_simulation
--- ---
### Csomagok ### Csomagok
- Webfejlesztés: - Webfejlesztés:
...@@ -136,21 +139,20 @@ Note: ...@@ -136,21 +139,20 @@ Note:
- Flexx - Flexx
+++ +++
- Data visualization - Data visualization
- matplotlib - matplotlib
- Plotly - Plotly
- geoplotlib - geoplotlib
Note: Note:
--- ---
### Pip ### Pip
- csomagkezelő - Csomagkezelő
- egy helyen van minden - Egy helyen van minden
- könnyen használható - Könnyen használható
Note: Note:
...@@ -163,12 +165,11 @@ Note: ...@@ -163,12 +165,11 @@ Note:
pip install flake8 pip install flake8
``` ```
--- ---
### Virtualenv ### Virtualenv
- saját környezet minden projekthez - Saját környezet minden projekthez
Note: Note:
...@@ -195,22 +196,22 @@ python3 -m venv venv ...@@ -195,22 +196,22 @@ python3 -m venv venv
``` ```
```bash ```bash
source venv\bin\activate source venv/bin/activate
``` ```
--- ---
### Flake8 ### Flake8
- linter - Linter
- segít jobb kódot írni: - Segít jobb kódot írni:
- syntax error - Syntax error
- typo - Typo
- rossz formázás - Rossz formázás
- pep8 - pep8(Style Guide)
Note: Note:
pep8:
- Style Guide - Style Guide
- átlátható - átlátható
- egységes - egységes
...@@ -322,26 +323,34 @@ stringabc ...@@ -322,26 +323,34 @@ stringabc
+++ +++
- bármilyen típus tartalmazhat (általában egyforma) - Bármilyen típust tartalmazhat (általában egyforma)
- Az elemek indexelhetőek - Az elemek indexelhetőek
- módosítható(mutable) - Módosítható(mutable)
```python
myList = ['physics', 'chemistry', 'physics', 1997, 2000]
```
+++ +++
```python ```python
print ("myList[0]: ", myList[0]) list = ['a', 'b', 'c', 1, 2, 3]
print ("myList[1:5]: ", myList[1:5]) for a in list:
print(a)
list[4] = 22
list.append(50)
del(list[3])
print(list[2:])
``` ```
Output:
```python ```python
myList.append(5) a
del myList[2] b
c
1
2
3
['c', 22, 3, 50]
``` ```
--- ---
...@@ -354,15 +363,32 @@ del myList[2] ...@@ -354,15 +363,32 @@ del myList[2]
- De nem módosítható(immutable) - De nem módosítható(immutable)
+++
```python ```python
tup1 = (12, 34.56) tuple = ('a', 'b', 3)
tup2 = ('abc', 'xyz') item = tuple[2]
for a in tuple:
print(a)
a, b, c = tuple
print(c)
tuple2 = (34, 56, 'd')
tuple3 = tuple + tuple2
print(tuple3)
``` ```
Output:
```python ```python
# tup1[0] = 100; a
tup3 = tup1 + tup2 b
print (tup3) 3
3
('a', 'b', 3, 34, 56, 'd')
``` ```
--- ---
...@@ -374,14 +400,25 @@ print (tup3) ...@@ -374,14 +400,25 @@ print (tup3)
- Kulcs érték pár - Kulcs érték pár
- A kulcs egyedi, érték bármi lehet - A kulcs egyedi, érték bármi lehet
```python +++
dict = {'Name': 'Zara', 'Age': , 'Class': 'First'}
```
```python ```python
print ("dict['Name']: ", dict['Name']) dict = {'Name': 'Zara', 'Age': 10 , 'Class': 'First'}
dict['Age'] = 8 dict['Age'] = 8
for key, value in dict.items():
print (key, " : ", value)
del dict['Name'] del dict['Name']
print('Name' in dict)
```
Output:
```python
Name : Zara
Age : 8
Class : First
False
``` ```
--- ---
...@@ -393,6 +430,8 @@ del dict['Name'] ...@@ -393,6 +430,8 @@ del dict['Name']
- mint a lista, csak minden érték egyszer szerepelhet - mint a lista, csak minden érték egyszer szerepelhet
- nem biztos, hogy sorban tárolja - nem biztos, hogy sorban tárolja
+++
```python ```python
set = {1, 3, 5} set = {1, 3, 5}
print(1 in set) print(1 in set)
...@@ -445,7 +484,7 @@ def fibonacci(n = 10): ...@@ -445,7 +484,7 @@ def fibonacci(n = 10):
- Tetszőlegesen sok paraméter - Tetszőlegesen sok paraméter
```python ```python
def minimum(first, *args): # *args néven szokás def minimum(first, *args):
acc = first acc = first
for x in args: for x in args:
if x < acc: if x < acc:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment