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
19alıştırma
60dk video
Derslere git →1. ders ücretsiz · Beyond Pass hepsini açar

Diğer dillerde: English

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 Ücretsiz

    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

    Variables and data types Beyond Pass

    7:00–15:008 dk video

    Bu derste değişkenlerde değer saklamayı, Python'un temel veri türlerini (tam sayılar, ondalıklı sayılar, metinler ve boolean değerler) ve kullanıcıdan girdi alıp bunu bir sayıya dönüştürmeyi öğreneceksin. Dersin sonunda doğum yılını isteyen ve yaşı hesaplayan küçük bir program yazabiliyor olacaksın.

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

    Metinler ve kullanıcı girdisi alma Beyond Pass

    15:00–21:006 dk video

    Bu derste input() fonksiyonunun kullanıcıdan metin nasıl istediğini 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ı da öğreneceksin.

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

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

    21:00–28:007 dk video

    Bu ders, Python'un metinleri ve sayıları in operatörü ve % kalan operatörü ile nasıl kontrol ettiğini ve bir kod satırında işlemlerin sırasını nasıl belirlediğini gösterir. Ayrıca += ve -= gibi kısa yazımlı (shorthand) operatörleri de gösterir.

    2 kod3 adım2 alıştırma3 soru
  5. 5

    Conditions in Python: if, elif and the logic behind them Beyond Pass

    28:00–35:007 dk video

    This lesson shows how Python checks conditions with comparison and logical operators, and how if, elif and else choose which code runs. You will write and test small programs that make decisions based on a value.

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

    Conditionals in Practice: elif, else and a Weight Converter Beyond Pass

    35:00–42:007 dk video

    This lesson shows how to chain several conditions with elif and finish with a catch-all else. It then builds a small weight converter that asks for a value and a unit and picks the right calculation.

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

    Python'da Fonksiyon Yazma ve Çağırma Beyond Pass

    42:00–49:007 dk video

    Fonksiyonun ne olduğunu, def ile nasıl tanımlandığını ve nasıl çağrıldığı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 mini proje Beyond Pass

    49:00–1:00:0511 dk video

    Bu ders, videoda gösterilen liste ve demet (tuple) araçlarını kapsar: "in" ile üyelik kontrolü yapmak, for ile döngü kurmak, range kullanmak ve count() ile öğeleri saymak gibi. Ders, mini projenin başlangıcıyla biter. Bu bölümün metni kısa olduğu için ders, karelerde gösterilenlerle sınırlı kalır.

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

Final projesi

Cep Harcama Takipçisi: Eksiksiz bir Python konsol programı

Listeler, demetler ve sözlüklerde harcamaları saklayan, input() ile kullanıcıdan veri alan ve float() ile çeviren, if/elif/else ile karar veren ve fonksiyonlarla mantığı yeniden kullanan küçük bir komut satırı harcama takipçisi yap. Bu program, kursun tüm çıktılarını tek bir çalışan programda bir araya getirir; para için 6. dersteki ağırlık dönüştürücüsü tarzını izler. Sonuç, kursun küçük yapı taşlarının gerçek bir araca dönüşebileceğini gösterir.

7 görev Beyond Pass ile açılır.

Ü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

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.

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. After age = 20, what does print(age) show?

    1. age
    2. 20
    3. age = 20
    4. an error
    Cevabı göster

    B. 20 · print(age) shows the value stored in the variable age, which is 20.

    6:40 o anı izle
  3. Which editor does the video install to write Python?

    1. Word
    2. PyCharm Community Edition
    3. Excel
    4. Photoshop
    Cevabı göster

    B. PyCharm Community Edition · The video installs PyCharm Community Edition, a free Python editor.

    3:01 o anı izle

1. dersi videoyla aç →

2–8. dersler ve final projesi

Beyond Pass ile açılırlar: her kursun her dersi, eksiksiz. Tek ödeme: 90 gün için $14.99 ya da bir yıl için $29. Abonelik yok.

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