Advertisement
Guest User

Dec-13-Retake/01. Warrior's Quest

a guest
Mar 29th, 2020
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.07 KB | None | 0 0
  1. skill=input()
  2. command=input()
  3. while command!="For Azeroth" :
  4.  
  5.     if "GladiatorStance" in command:
  6.         skill=skill.upper()
  7.         print (skill)
  8.     elif "DefensiveStance" in command:
  9.         skill = skill.lower()
  10.         print(skill)
  11.     elif "Dispel" in command:
  12.         command = command.split(" ")
  13.         ind=int(command[1])
  14.         lettertochange=command[2]
  15.         lst_of_skill=list(skill)
  16.         if 0<=ind<len(lst_of_skill):
  17.             lst_of_skill[ind]=lettertochange
  18.             skill="".join(lst_of_skill)
  19.             print ("Success!")
  20.         else:
  21.             print ("Dispel too weak.")
  22.     elif "Target Change" in command:
  23.         command = command.split(" ")
  24.         initial_subs = command[2]
  25.         new_subs = command[3]
  26.         skill=skill.replace(initial_subs,new_subs)
  27.         print (skill)
  28.     elif "Target Remove" in command:
  29.         command = command.split(" ")
  30.         sub_to_remove=command[2]
  31.         skill=skill.replace(sub_to_remove,"")
  32.         print (skill)
  33.     else:
  34.         print ("Command doesn't exist!")
  35.     command=input()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement