An open API service indexing awesome lists of open source software.

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

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
//Örnek

a = 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:

Screen Shot 2021-06-03 at 13 01 40

Screen Shot 2021-06-03 at 13 02 05

Screen Shot 2021-06-03 at 13 02 24