The army of units

Report a typo

In a computer game, each gamer has an army of units.

Write a program that will classify the army of your enemies corresponding to the following rules:

Units: Category

less than 1: no army

from 1 to 9: few

from 10 to 49: pack

from 50 to 499: horde

from 500 to 999: swarm

1000 and more: legion

The program should read the number of units and output the corresponding category.

Sample Input 1:

18

Sample Output 1:

pack

Sample Input 2:

5

Sample Output 2:

few
Write a program in Python 3





___

Create a free account to access the full topic