Python-100-Days/Day31-35/code/josephu.py

23 lines
457 B
Python
Raw Normal View History

2018-07-22 23:49:55 +08:00
def main():
persons = [True] * 30
counter = 0
index = 0
number = 0
while counter < 15:
if persons[index]:
number += 1
if number == 9:
persons[index] = False
number = 0
counter += 1
index += 1
index %= len(persons)
for person in persons:
print('' if person else '', end='')
print()
if __name__ == '__main__':
main()