0Pricing
Mojo Academy · Ders

Int, Float ve Bool

Mojo'nun sayısal ve mantıksal türleriyle çalışın.

Int, Float ve Bool, CoddyKit'te ücretsiz bir Mojo Academy dersidir. Bu, 4 dersinin 2. dersidir. Aşağıdan dersin tamamını ücretsiz okuyabilir, sonra tarayıcıda yerleşik kod editörü ve 7/24 yapay zeka koçu ile uygulamalı olarak pratik yapabilirsin. Bu, Mojo Academy öğrenme yolunun bir parçasıdır ve ilerlemeniz web ve CoddyKit uygulaması arasında senkronize olur. Mojo Academy kursu toplamda 4 dersten oluşur.

Bu dersin bazı bölümleri henüz çevrilmemiş olup İngilizce olarak gösterilmektedir.

Values Have Types

Every value belongs to a type that says what it is and what you can do with it. Three core types start you off.

Int for Whole Numbers

An Int holds whole numbers like counts and indexes, with no fractional part at all.

var count = 42

Math with Int

Ints support the usual arithmetic. Add, subtract, and multiply them just as you would expect on whole numbers.

var apples = 3 + 4
print(apples)

Float for Decimals

A Float stores numbers with a decimal point, perfect for measurements, prices, and anything fractional.

var price = 9.99

Int and Float Differ

10 is an Int but 10.0 is a Float. The decimal point is what makes a literal a Float instead of an Int.

var whole = 10
var fraction = 10.0

Float Division

Dividing with / gives a Float result so fractions are not lost. That keeps precision when numbers do not divide evenly.

var half = 5 / 2
print(half)

Bool Is True or False

A Bool holds just one of two values: True or False. It answers yes-or-no questions in your logic.

var is_ready = True

Comparisons Make Bools

Comparing values produces a Bool. The expression 3 > 2 evaluates to True, while 1 == 2 is False.

var bigger = 3 > 2
print(bigger)

Bools Drive Decisions

Bools feed your if-statements later. Storing a comparison in a clearly named Bool makes branching code read well.

var is_adult = age >= 18

Pick the Right Number Type

Use Int when fractions cannot exist, like a head count. Reach for Float when a value can have a decimal.

Three Tools, Many Programs

Int, Float, and Bool already cover counting, measuring, and deciding. Most logic you write leans on these core types.

Quick Check

You write the literal 10.0 instead of 10 in your Mojo code. What type is that value?

Recap

Int counts, Float measures with decimals, and Bool holds True or False. Comparisons produce Bools that steer your logic. 🎯

Sıkça Sorulan Sorular

“Int, Float ve Bool” dersi ücretsiz mi?

Evet — “Int, Float ve Bool” dersin tüm metni burada web'de ücretsiz olarak okunabilir. Etkileşimli olarak pratik yapmak (yerleşik kod editörü ve 7/24 yapay zeka koçu) ve Mojo Academy kursunun geri kalanını açmak için CoddyKit PRO'ya yükselt. Mojo Academy kursu toplamda 4 dersten oluşur.

“Int, Float ve Bool” dersinde ne öğreneceğim?

Mojo'nun sayısal ve mantıksal türleriyle çalışın. Mojo Academy ile uygulamalı kodu tarayıcıda doğrudan çalıştırarak pratik yaparsın ve 7/24 yapay zeka koçu dersi çalışırken sorularını yanıtlar.

Mojo Academy öğrenmeye başlamak için deneyim gerekli mi?

Önceden deneyim gerekmez. CoddyKit'te Mojo Academy, başlangıçtan ileri seviyeye kadar yapılandırıldığı için buradan başlayabilir veya başından başlayıp kendi hızında ilerleme yapabilirsin. Bu, 4 dersinin 2. dersidir.

“Int, Float ve Bool” dersi ne kadar sürer?

Çoğu CoddyKit dersi yaklaşık 5–10 dakika sürer. Her biri kısa ve etkileşimli olduğu için sabit ilerleme yaparsın ve web ile uygulama arasında tam olarak bıraktığın yerden devam edebilirsin.

Bu Mojo Academy dersinde kod yazıp çalıştırabilir miyim?

Evet. Her Mojo Academy dersi yerleşik bir kod editörü içerir, bu sayede tarayıcıda gerçek kod yazıp çalıştırabilir ve anlık yapay zeka geri bildirimi alırsın — yerel kurulum gerekli değildir.

Bu kursun tüm dersleri

  1. var ile Değer Tanımlama
  2. Int, Float ve Bool
  3. Dizeler ve Metin
  4. Yardımcı Tür Açıklamaları
← Mojo Academy Sayfasına Dön