value_1 = 1000000
value_2 = 500000
value_3 = 800000
average = (value_1 + value_2 + value_3) // 3
print(average)
pendapatan = 1000000 + 500000 + 800000
print(pendapatan // 3)
print(25 + 30)
print(10 - 5 * 20)
print(4 / 2)
print(4 % 2)
print(12 ** 2)
print(111 // 5)
# akan muncul error karena diawali dengan angka
1_var = 100
current_year = 2021
last_year = 2020
print(current_year, last_year)
# ini adalah baris komentar dalam Python (baris yang dimulai dengan `#`)
x, y, z = 10, 11, 12
print(x)
print(y)
print(z)
my_population = 12091840
my_population = my_population + 1000000
print(my_population)
my_population *= 0.5
print(my_population)
my_population = 1000
print(type(10))
print(type(1), type(-10))
print(3.15, type(3.14))
print(.5101, type(.05101))
print(10.0, type(10.0))
# konversi tipe data dari float ke int, dan sebaliknya
x_int = 10
y_float = 3.14
x_float = float(x_int)
y_int = int(y_float)
print(x_int, y_int)
print(x_float, y_float)
print(float(y_float))
simple_int = int()
simple_float = float()
print(simple_int, simple_float)
int()
print(5 < 3)
print(3 <= 5)
print(5 != 5.)
print("bit" == "Bit")
print("abjad" > "Abjad")
print("abjad" > "abjaf")
print("1" >= "10")
is_more = x > z
print(is_more, type(is_more))
benar = True
salah = False
true = True
print(benar, salah, true)
print("1:", benar and true)
print("2:", benar and salah)
print("3:", salah or true)
print("4:", benar and salah and true)
print("5:", benar and benar and benar and benar)
print("dini:", benar and salah or benar)
print("6:", (not true or salah) and benar or not(benar and true))
# 1. not true or salah => False
# 2. benar and true => True
# 3. `False` and benar => False
# 4. `False or not `True`
p = q = 1
p_and_notq = bool(p and not q)
notp_and_q = bool(not p and q)
# notp_and_notq = # KETIK DI SINI
p_or_notq = bool(not q or p)
# notp_or_q = # KETIK DI SINI
# notp_or_notq = # KETIK DI SINI
x = "python"
y = "python from bitlabs"
y_ = "PYTHON"
z = x or y
z_ = y_ or y
print(x, bool(x), bool(0), bool(0.), bool(-183.2408163946))
print(y, bool(y), bool(""))
print(z)
print(z_)
not q
print(p, bool(p))
print(q, bool(q))
print(p_and_notq)
print(notp_and_q)
print(p_or_notq)
my_population += 500
print(my_population)