Dersler · Kodlama · başlangıç · Programming with Mosh

Python for Beginners - Learn Coding with Python in 1 Hour

Programming with Mosh kanalının “Python for Beginners - Learn Coding with Python in 1 Hour” videosu 8 ders halinde: konunun anlatımı, ekrandaki kod, alıştırma terminalinde denenecek adımlar, çözümlü alıştırmalar ve cevabı videodaki ana götüren bir quiz.

8ders
21kod parçası
4formül
23alıştırma
60dk video
Derslere git →Şimdilik bütün dersler ücretsiz

Diğer dillerde: English · Español

Video İngilizce. YouTube oynatıcısında altyazıyı açıp Otomatik çevir → Türkçe seçebilirsin.

Python for Beginners - Learn Coding with Python in 1 Hour, video by Programming with Mosh▶ 1:00:05 · Programming with Mosh
12345678
0:00videonun tamamına yayılmış 8 ders1:00:05

Neler yapabileceksin

  • Install Python and run a first program from the terminal or an editor
  • Create variables and choose appropriate data types for numbers, strings, and booleans
  • Write conditionals and loops to control program flow
  • Use lists, tuples, and dictionaries to store and organize data
  • Define and call functions with parameters and return values
  • Build a small complete Python program that combines these concepts

Önce bilmen iyi olur

  • Basic comfort using a computer and opening files
  • Ability to install software or follow setup instructions

Müfredat

8 ders ve bir final projesi

  1. 1

    Setting up Python and writing a first program

    0:00–7:007 dk video

    You will install Python and PyCharm, create a project and a Python file, and run your first lines of code with print(). You will also see how a variable stores a value that print() can show.

    2 kod7 adım2 alıştırma3 soru
  2. 2

    Değişkenler ve veri tipleri

    7:00–15:008 dk video

    Bu derste değerleri değişkenlerde nasıl saklayacağını, Python'un kullandığı temel veri tiplerini (tam sayılar, ondalıklı sayılar, string'ler ve boolean'lar) ve kullanıcıdan nasıl girdi alıp bunu sayıya nasıl çevireceğini öğreneceksin. Dersin sonunda doğum yılı isteyip yaşı hesaplayan küçük bir program yazabiliyor olacaksın.

    3 kod3 adım3 alıştırma3 soru
  3. 3

    Strings ve kullanıcı girdisini almak

    15:00–21:006 dk video

    Bu derste input() fonksiyonunun kullanıcıdan metin istemesini ve neden döndürdüğü her değerin bir string olduğunu öğreneceksin. Ayrıca string'leri float() ile sayıya, str() ile tekrar metne nasıl çevireceğini ve bir string'in metotlarının nokta ile nasıl kullanıldığını göreceksin.

    2 kod3 adım3 alıştırma3 soru
  4. 4

    Koşullar ve karşılaştırmalar

    21:00–28:007 dk video

    Bu derste string metodu replace, True ya da False yanıtı veren in operatörü ve kalan operatörü % işlenir. Ayrıca += ve -= gibi kısaltılmış operatörler ve Python'un bir ifadeyi hesaplama sırası da anlatılır.

    2 kod3 adım3 alıştırma4 soru
  5. 5

    Python'da koşullar: if, elif ve bunların arkasındaki mantık

    28:00–35:007 dk video

    Bu derste Python'un karşılaştırma ve mantıksal operatörlerle koşulları nasıl kontrol ettiğini, if, elif ve else'in hangi kodun çalışacağını nasıl seçtiğini göreceksin. Bir değere göre karar veren küçük programlar yazıp deneyeceksin.

    3 kod3 formül3 adım2 alıştırma3 soru
  6. 6

    Koşullarla Uygulamada: elif, else ve Bir Ağırlık Dönüştürücü

    35:00–42:007 dk video

    Bu ders, birden fazla koşulu elif ile nasıl zincirleyeceğini ve bir catch-all else ile nasıl bitireceğini gösterir. Ardından bir değer ve bir birim isteyen, doğru hesabı seçen küçük bir ağırlık dönüştürücü yapar.

    2 kod1 formül4 adım3 alıştırma4 soru
  7. 7

    Python'da Fonksiyon Yazma ve Çağırma

    42:00–49:007 dk video

    Fonksiyonun ne olduğunu, def ile nasıl tanımlanacağını ve nasıl çağrılacağını öğreneceksin. Bir fonksiyonun girdi (parametre) alabildiğini ve birçok kez yeniden kullanılabildiğini göreceksin.

    2 kod2 adım3 alıştırma3 soru
  8. 8

    Sözlükler ve küçük bir proje

    49:00–1:00:0511 dk video

    Bu ders liste, aralık (range) ve demet (tuple) için kullanışlı araçları gösterir. Bir değerin listede olup olmadığını in ile kontrol edersin, for döngüsüyle öğeleri gezersin, range() ile sayı dizileri oluşturursun ve count() ile bir demetteki değeri sayarsın. Bölüm, küçük proje için başlayacağı boş bir app.py dosyasıyla biter.

    5 kod2 adım4 alıştırma3 soru

Final projesi

Cep Harcama Takipçisi: Eksiksiz bir Python Konsol Programı

Liste, demet ve sözlüklerde kayıt tutan, input() ile kullanıcıdan veri isteyen, float() ile dönüştüren, if/elif/else ile karar veren ve fonksiyonlarla mantığı yeniden kullanan küçük bir komut satırı harcama takipçisi yap. Bu, kursun tüm çıktılarını tek bir çalışan programda bir araya getirir ve 6. dersteki ağırlık dönüştürücüsünün tarzını paraya uyarlar. Sonuç, kursun küçük yapı taşlarının gerçek bir araca dönüştüğünü gösterir.

Ücretsiz önizleme · 1. dersin tamamı

Setting up Python and writing a first program

You will install Python and PyCharm, create a project and a Python file, and run your first lines of code with print(). You will also see how a variable stores a value that print() can show.

0:00 videoda 7:00 anına kadar

Alıştırma terminali

Dersin komutlarını yaz, boz ve nedenini gör.

Kod alanı

Kodu gerçek Python ve JavaScript ile çalıştır, değiştir.

Karalama defteri

Videonun yanında çiz ve yaz.

Fikir

To write Python you need two things: the Python interpreter, which runs your code, and an editor where you type it. The video installs Python from the official Python installer (on macOS it shows Python 3.8.1 for macOS 10.9 or later) and then installs PyCharm Community Edition, a free editor made for Python. You drag PyCharm into the Applications folder like any other Mac app.

Next, open PyCharm and create a new project, here named HelloWorld. A project is a folder that holds your Python files. Inside it, right-click the project and choose New, then Python file. Name the file app.py. The .py ending tells the computer this file contains Python code.

Your first program is one line: print("Hello World"). The word print is a built-in instruction that shows whatever you put inside the brackets on the screen. The text inside the quotation marks is a string, which is a piece of text. Run the program from the Run menu (Run...), and the output Hello World appears in the panel at the bottom.

Print can also show a value stored in a variable. A variable is a name that holds a value. The line age = 20 creates a variable called age and stores the number 20 in it. The line print(age) then shows 20. Notice the difference: print("age") would show the word age, while print(age) shows the value stored under that name.

In short, you install Python and an editor, make a project and a .py file, write instructions, and run them. Each run executes the file from top to bottom, one line after another.

Ana noktalar

  • Python needs an interpreter (installed from the Python installer) and an editor such as PyCharm Community Edition. 1:51
  • A project is a folder for your files; a Python file ends with .py, for example app.py. 4:00
  • print("Hello World") shows the text Hello World; the text inside the quotes is a string. 5:01
  • Run... in the Run menu executes the file, and the output appears at the bottom of the window. 5:01
  • print(age) shows the value stored in the variable age, which is 20 after age = 20. 6:40

Bilmen gereken kelimeler

interpreter
The program that reads your Python code and runs it.
editor
The program where you type your code, for example PyCharm.
project
A folder that holds your Python files.
string
A piece of text inside quotation marks, like "Hello World".
variable
A name that holds a value, like age holding 20.

Ekrandaki kod

First programpython 5:01 on screen
print("Hello World")

Save as app.py in your PyCharm project and press Run.

Printing a variablepython 6:40 on screen
age = 20
print(age)

Save as app.py in your PyCharm project and press Run.

Alıştırma terminalinde birlikte yap

  1. Download and run the Python installer from python.org and click Continue through the steps until it finishes. 1:51Göreceğin: Python is installed on your computer.
  2. Drag PyCharm CE into the Applications folder, then open PyCharm. 3:01Göreceğin: PyCharm opens and is ready to create a project.
  3. Create a new project called HelloWorld. 4:00Göreceğin: The HelloWorld project appears in the Project panel.
  4. Right-click the project, choose New, then Python file, and name it app.py. 4:00Göreceğin: app.py opens in the editor.
  5. Type print("Hello World") into app.py. 5:01
    $ print("Hello World")
    Göreceğin: The line is shown in the editor.
  6. Choose Run from the Run menu (or press the run button). 5:01Göreceğin: The output Hello World appears at the bottom.
  7. Replace the code with age = 20 and print(age), then run again. 6:40
    $ print(age)
    Göreceğin: The output shows 20.

Dikkat

  • Writing print("age") when you want the value: with quotes it shows the word age; without quotes, print(age) shows 20.
  • Forgetting the file ending: a Python file must end with .py, like app.py.

Alıştırma

Kod Çözümü kontrol edildi

Create a variable called name that stores the text "Sara" and print it.

# Write your code below
İpucu

Strings go in quotes. A variable is made with name = value, and print(name) shows its value.

Çözüm
  1. Create the variable: name = "Sara".
  2. Print the variable: print(name).
  3. Running it shows Sara (no quotes, because print shows the value).
name = "Sara"
print(name)

Sara

Hesapla Çözümü kontrol edildi

A file has these lines: age = 20, then print(age), then age = 25, then print(age). What are the two numbers printed, added together?

İpucu

Lines run from top to bottom, so the second print sees the new value of age.

Çözüm
  1. The first print(age) runs when age is 20, so it prints 20.
  2. Then age becomes 25, and the second print(age) prints 25.
  3. 20 + 25 = 45.

45

Karalama defterinde

Draw a box labelled age, and write 20 inside it. Next to it, sketch what print(age) puts on the screen.

Test

  1. What does the file ending .py tell the computer?

    1. The file is a picture
    2. The file contains Python code
    3. The file is a folder
    4. The file is encrypted
    Cevabı göster

    B. The file contains Python code · Files ending in .py hold Python code that the interpreter can run.

    4:00 o anı izle
  2. age = 20 ardından print(age) ne gösterir?

    1. age
    2. 20
    3. age = 20
    4. bir hata
    Cevabı göster

    B. 20 · print(age), age değişkeninde saklanan değeri gösterir; bu değer 20.

    6:40 o anı izle
  3. age = 20 ardından print("age") ne gösterir?

    1. 20
    2. age kelimesi
    3. age = 20
    4. Hiçbir şey
    Cevabı göster

    B. age kelimesi · Tırnak içindeki metin bir string'tir, bu yüzden print("age") age kelimesini gösterir. Yalnızca print(age) saklanan değeri gösterir.

    6:40 o anı izle

1. dersi videoyla aç →

Devam et

Bu konuda kitaplar

Bu kursun konusu üzerine kitaplar için mağaza aramaları — videonun ya da kanalın seçimi değil. Beyond, uygun alışverişlerden komisyon kazanabilir (Amazon Associates).

Beyond, Programming with Mosh kanalının “Python for Beginners - Learn Coding with Python in 1 Hour” videosundan yaptı. Video YouTube’un kendi oynatıcısında oynar. YouTube’da izle · Bütün dersler