Advertisement
PowerCell46

Building Python

Dec 19th, 2022
841
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. number_of_floors = int(input())
  2. number_of_rooms = int(input())
  3.  
  4. for floor in range(number_of_floors, 0, -1):
  5.     if floor == number_of_floors:
  6.         current_floor = "L"
  7.     elif floor % 2 == 0:
  8.         current_floor = "O"
  9.     elif floor % 2 != 0:
  10.         current_floor = "A"
  11.     current_print = ""
  12.     for room in range(0, number_of_rooms):
  13.         current_print += (f'{current_floor}{floor}{room} ')
  14.     print(current_print)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement