Closed dudung closed 1 year ago
flowchart LR
B --> I --> P --> O --> E
B(("Begin"))
I[/"read x, y"/]
P["z = x - y"]
O[/"display z"/]
E(("End"))
flowchart TD
B --> I --> D
D --Y--> C1a
D --N--> C2a
C1b --> P1 --> O
C2b --> P2 --> O
O --> E
C1a(("1"))
C1b(("1"))
C2a(("2"))
C2b(("2"))
B(("Begin"))
I[/"x"/]
D{"x > 0?"}
P1["msg = 'Bilangan Negatif'"]
P2["msg = 'Bilangan Positif'"]
O[/"x is msg"/]
E(("End"))
flowchart TB
B --> I --> D --Y--> O1 --> E
D --N-->O2 --> E
B(("Begin"))
I[/"Input"/]
O1[/"Kelipatan 2"/]
O2[/"Bukan kelipatan 2"/]
E(("End"))
D{"Apakah kelipatan 2?"}
# begin
# input
x = int(input("Input angka : "))
# decision
if x % 2 == 0:
# process 1
msg = "Angka kelipatan 2"
else:
# process 2
msg = "Bukan kelipatan 2"
# ouput
print(x, "adalah", msg)
# end
flowchart LR
B --> I --> P --> O --> E
B(("Start"))
I[/"read x, y"/]
P["z = x - y"]
O[/"display z"/]
E(("End"))
x = float(input("x = ")) y = float(input("y = "))
z = x - y
print("z = x - y =", z)
flowchart LR
B --> I --> O --> E
B(("Begin"))
I[/"read x"/]
O[/"display x"/]
E(("End"))
flowchart LR
B --> I --> O --> E
B(("Begin"))
I[/"read x"/]
O[/"display x"/]
E(("End"))
flowchart LR
B --> I --> P --> O --> E
B(("Begin"))
I[/"read x, y"/]
P["z = x - y"]
O[/"display z"/]
E(("End"))
flowchart TD
B --> I --> D1 --Y--> C1a
D1 --N--> C2a
C1b --> P1 ---> C3a
C2b --> D2 --Y--> P2
D2 --N--> P3
P2 & P3 --> C3a
C3b --> O --> E
C1a(("1"))
C1b(("1"))
C2a(("2"))
C2b(("2"))
C3a(("3"))
C3b(("3"))
B(("Begin"))
I[/"x"/]
D1{"x < 0"}
D2{"x > 0"}
P1["msg = 'negative'"]
P2["msg = 'positive'"]
P3["msg = 'zero'"]
O[/"x is msg"/]
E(("End"))
flowchart TD
B --> I --> D
D --Y--> C1a
D --N--> C2a
C1b --> P1 --> O
C2b --> P2 --> O
O --> E
C1a(("1"))
C1b(("1"))
C2a(("2"))
C2b(("2"))
B(("Begin"))
I[/"x, y"/]
D{"x < y?"}
P1["sign = '<'"]
P2["sign = '>='"]
O[/"x sign y"/]
E(("End"))
flowchart LR
B --> I --> O --> E
B(("Mulai"))
I[/"Penjumlahan x+y"/]
O[/"tampilkan hasil penjumlahan"/]
E(("Akhir"))
flowchart TD
B --> I --> D
D --Y--> C1a
D --N--> C2a
C1b --> P1 --> O
C2b --> P2 --> O
O --> E
C1a(("1"))
C1b(("1"))
C2a(("2"))
C2b(("2"))
B(("Mulai"))
I[/"V, T"/]
D{"V < T?"}
P1["sign = '<'"]
P2["sign = '>='"]
O[/"v sign t"/]
E(("Selesai"))
flowchart LR
B --> I --> P --> O --> E
B(("Start"))
I[/"Masukkan x, y"/]
P["z = x - y"]
O[/"Hasilnya z"/]
E(("End"))
#MENGHITUNG LUAS PERSEGI PANJANG
#AKHMAD FAEDA INSANI
# INPUT PANJANG & LEBAR
p = float(input('input panjang: '))
l= float(input('input lebar: '))
#PROCESS--> HITUNG LUAS
luas = p * l
#OUTPUT-->TAMPILKAN HASIL PERHITUNGAN
print('Luas Persegi Panjang %0.2f' %luas)
flowchart LR
B --> I --> P-->O-->E
B(("MULAI"))
I[/"INPUT : float p & l"/]
P["HITUNG LUAS = p * l"]
O[/"DISPLAY "LUAS""/]
E(("SELESAI"))
x = float(input("x = ")) y = float(input("y = "))
z = x - y
print("z = x - y =", z)
""" $ python substract.py x = 5 y = 7.2 z = x - y = -2.2 """
flowchart LR
B --> I --> P --> O --> E
B(("Begin"))
I[/"read x, y"/]
P["z = x - y"]
O[/"display z"/]
E(("End"))
flowchart LR
B --> I --> P --> O --> E
B(("Begin"))
I[/"read a, b, c"/]
P["x = (a*b)/c"]
O[/"display x"/]
E(("End"))
Silakan mencoba contoh terintegrasi numbers yang diberikan dengan memberikan komentar di bawah ini.