https://github.com/escan-dnmz/python-syntax
I hope it works for you
https://github.com/escan-dnmz/python-syntax
python python-notes python-syntax syntax
Last synced: about 2 months ago
JSON representation
I hope it works for you
- Host: GitHub
- URL: https://github.com/escan-dnmz/python-syntax
- Owner: Escan-DNMZ
- License: gpl-3.0
- Created: 2021-06-03T10:00:22.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-13T21:25:33.000Z (about 3 years ago)
- Last Synced: 2025-02-02T22:01:53.354Z (4 months ago)
- Topics: python, python-notes, python-syntax, syntax
- Homepage:
- Size: 19.5 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Python-syntax
I hope it works for you
---
# Python---
Kod sonları **( : )** ile yapılır stringler **( "" )** ve **('')** ile belirtilir
Pythonda **{ }** kullanılmaz. Pythonda girinti önem arz eder
## Fonksiyonlar
```python
def hello():
print("Merhaba")
hello() #hello yazıldığında merhaba yazacak
```
// notlar tamamen Escan'a aittir
### Fonksiyona parametre gönderme```python
defhello(name):
print("Merhaba "+ name)hello("Escan") # Merhaba Escan
```## if/elif/else koşulu
```jsx
//Örneka = 1
b = 2
if a < b : // Python da koşul girerken ( ) kullanılmaz.
print("a küçüktür")
elif b == a : // Python da (else if) mantısı elif ile çalışır
print("a b ile eşittir")
else: // Değilse anlamına gelir
print("a b den büyüktür")
```## Python Döngüler
### For döngüsü
```python
sayilar = [1,2,3,4,5]
for sayi in sayilar:
print(sayi)
```
// notlar tamamen Escan'a aittir
### While döngüsü```python
i = 1
while i < 5:
print(i)
i += 1
```## Python kullanıcıya girdi sormak
Pythonda kullanıcıya girdi sormak için **input** kullanılır
```jsx
isim = input('isminiz: ') //şeklinde kullanılır
```## Operatörler: