Untitled
plain_text
2 months ago
547 B
3
Indexable
Never
# pengaturan tempat duduk #kamus # 1 : 4 = kolom # 1, 2, 3, ketiganya kalau // 4 = 0 --> baris 1 # 5, 6, 7, ketiganya kalau // 4 = 1 --> baris 2 tiket = int(input("masukan nomor tiket")) kolom = tiket % 4 if kolom == 0: kolom = 'D' elif kolom == 1: kolom = 'A' elif kolom == 2: kolom = 'B' elif kolom == 3: kolom = 'C' # 1 -> A: 1 # 2 -> B: 2 # 3 -> C: 3 # 4 -> D: 0 # 5 -> A: 1 # 6 -> B: 2 # 7 -> C: 3 # 8 -> D: 0 baris = tiket // 4 if kolom != 0 : baris = baris + 1 print(f"Tempat duduk memiliki nomor {kolom}{baris}")