log in
About and Contact
© 2020 DOUBTCOOL
I approached this problem using Dictionaries ...... There are other ways to approach but using the dict is
the orthodox procedure for this problem... As ID is easily referred in dicts than any other datatype in
python...... :-) Happy coding :-)
t = int(input()) while(t): store = { "b":"BattleShip", "c":"cruiser", "d":"destroyer", "f":"friate" } item = input().lower() if item in store: print(store[item]) t-=1