fork download
  1. # your code goes here yea like i didnt know that na
  2.  
  3.  
  4. def hangman_two(w,g):
  5. new_str = ""
  6. for index in range(len(g)):
  7. if g[index] == w[index]:
  8. new_str = new_str + "C"
  9. else:
  10. new_str = new_str + "I"
  11.  
  12.  
  13. print(new_str)
  14.  
  15. hangman_two("cakes","baked")
  16. hangman_two("shake","snake")
  17. print("bareera")
  18. hangman_two("clear","clean")
  19. hangman_two("pearl","pizza")
  20. hangman_two("class","glare")
  21.  
  22.  
Success #stdin #stdout 0.04s 9580KB
stdin
Standard input is empty
stdout
ICCCI
CICCC
bareera
CCCCI
CIIII
ICCII