Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Escan-DNMZ/Python-syntax

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

6 Commits

Repository files navigation

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

def hello():
 print("Merhaba")
hello() #hello yazıldığında merhaba yazacak

// notlar tamamen Escan'a aittir

Fonksiyona parametre gönderme

defhello(name):
print("Merhaba "+ name)
hello("Escan") # Merhaba Escan

if/elif/else koşulu

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

sayilar = [1,2,3,4,5]
for sayi in sayilar:
 print(sayi)

// notlar tamamen Escan'a aittir

While döngüsü

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

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

About

I hope it works for you

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

AltStyle によって変換されたページ (->オリジナル) /