lamp1 = input("Lamp 1 status: on or off: ")
lamp2 = input("Lamp 2 status: on or off: ")
lamp3 = input("Lamp 3 status: on or off: ")
value = 0
if lamp1 == "on":
    value += 4
if lamp1 == "on":
    value += 2
if lamp1 == "on":
    value += 1
print("nilainya adalah", value)
#kalau perkondisiannya banyak bagaimana ya pak? saya gangerti
#001 = 1
#010 = 2
#011 = 3
#100 = 4
#101 = 5
#110 = 6
#111 = 7