Untitled - Posted on February Wed 3rd 1:46 AM (Never Expires) - Format: text
  1. import csv
  2. path='assets.csv'
  3. with open(path,'a', newline='')as csvfile:
  4.     writer = csv.writer(csvfile, dialect='excel')
  5.     csv_head=['COMMUNITY''BUIDING', 'UNIT', 'ROOM', 'DIRECTION', 'LOTS']
  6.     writer.writerow(csv_head)
  7.  
  8. title=input('Please enter the community name:')
  9. building=input('please enter the BUILDING NUMBER : #')
  10. unit_loop= True
  11. while unit_loop:
  12.     unit=input('Plz enter the unit number:  ')
  13.     start_floor=input('Plz enter the first floor:  ')
  14.     end_floor=input('Plz enter the last floor:  ')
  15.  
  16.     Sample=input('please enter 【room#】【Direction】【Lots】, click any button to continue...')
  17.     start_floor_rooms={}
  18.     floor_room_digits=[]
  19.  
  20.     room_loop=True
  21.     while room_loop:
  22.         last_two_digits=input('Plz input room last two digits(ex. 01,02)):  ')
  23.         floor_room_digits.append(last_two_digits)
  24.         room_number =int(start_floor+last_two_digits)
  25.         direction=int(input('Enter the direction: 1.SN 2.EW Please enter "1"or"2":  '))
  26.         area=int(input('please put lot squear of the ROOM %d'% room_number ))
  27.         start_floor_rooms[room_number]=[direction,area]
  28.  
  29.         keep_adding=input('Press any button for continue; "N" for no:  ')
  30.         if keep_adding =='N':
  31.             room_loop=False
  32.         else:
  33.             room_loop==True
  34.  
  35.  
  36.     unit_records={}
  37.     unit_records[start_floor]=start_floor_rooms
  38.     for floor in range(int(start_floor)+1, int(end_floor)+1):
  39.         floor_room={}
  40.         for i in range(len(start_floor_rooms)):
  41.             number= str(floor)+floor_room_digits[i]
  42.             info= start_floor_rooms[int(start_floor+floor_room_digits[i])]
  43.             floor_room[int(number)]=info
  44.         unit_records[floor]=floor_room
  45.  
  46.     with open ('assets.csv','a',newline='') as csvfile:1
  47.         writer = csv.writer(csvfile, dialect='excel')
  48.         for sub_dict in unit_records.values():
  49.             for room,info in sub_dict.items():
  50.                 direction= ['',SN,EW]
  51.                 writer.writerow([title, building,unit,building,room, direction[info[0]], info[1]])
  52.  
  53.  
  54.     unit_continure=input('Click anything for  inputin Next Unit, "N" for no.....')
  55.     if unit_continure== 'N':
  56.         unit_loop== False
  57.     else:
  58.         unit_loop== True
  59. print ('FUCK YES, FINISHED THIS SHIT!!!' )

New Paste

Paste Options

Recent Pastes

9 days ago

EARN PAYPAL IN A

10 days ago

QUICK CASH VIA

11 days ago

ATM cloned cards

11 days ago

ATM cloned cards

11 days ago

ATM cloned cards

11 days ago

ATM cloned cards

16 days ago

A MONEY MAKING B

16 days ago

A MONEY MAKING B

16 days ago

A MONEY MAKING B

16 days ago

A MONEY MAKING B