title: Bombs Away Battleships
body: <pre><code>print("----BATTLESHIPS 3.0 By NAME----")
  print("")
  print("")
  
  size = input("Map size: ")
  size = size.replace(" ", "")
  print("------")
  
  keys = {1:'A',2:'B',3:'C',4:'D',5:'E',6:'F',7:'G',8:'H',9:'I',10:'J',11:'K',12:'L',13:'M',14:'N',15:'O',16:'P',17:'Q',18:'R',19:'S',20:'T',21:'U',22:'V',23:'W',24:'X',25:'Y',26:'Z'}
  
  #COORDINATES
  for h in "ABCDEFGHIJKLMNOPQRSTUVWXYZ":
    for b in range(1, int(size) + 1): 
      num = [h, b]
      #print(num, end=' ')
  #COORDINATES
  
  dict = {}
  guess = input("Guess: ")
  guess = guess.lower()
  guess = guess.replace(" ", "")
  print("---")
  
  while guess:
  
    if guess in dict:
      print("Whoops! You've already hit that coordinate") 
  
    elif guess not in num:
      print("Woah! That isn't a square!")
  
    #elif int(guess[1:]) &gt; 10 and int(guess[1:]) &gt;= 1:
      #print("Woah! That isn't a square!")
  
    else:
      dict[guess]=guess
      print("Hit", guess.upper())
  
    guess = input("Guess: ")
    guess = guess.lower()
    guess = guess.replace(" ", "")
    print("---")
  
  yn = input("List your guesses? (yes or no)")
  yn = yn.lower()
  
  if yn == "yes":
  
    print("------")
    print("GUESSES:")
  
    print("---")
    for i in dict:
      print("-", i.upper()) 
  
  elif yn == "no":
    print("Ok, bye!")
  else:
    print("---")
    print("Please don't try and trick me. No scores for you!")
  </code></pre>
  
  <p>I am having a lot of trouble with this. I am supposed to create a program that extends a simple program called Bomb's Away. I am trying to limit the size of the map but not doing a very good job. Everything I input says it is not a square.</p>
  
  <p><strong>Image of my problem:</strong> <a href="http://i.imgur.com/iWZDxoH.png" rel="nofollow">http://i.imgur.com/iWZDxoH.png</a></p>
  
  <p><strong>Requirements:</strong></p>
  
  <p>Bombs Away is based on the Battleship Game where two players guess positions on a map. Each position on the map is identified by a Letter-Number location. In the original problem, the program recorded every position the player typed. If the coordinate was already recorded the program said so.</p>
  
  <ul>
  <li><p>The user is allowed to set the size of the map. The map is always square. The map cannot exceed the number of characters found in our alphabet (i.e. 26 characters). The smallest size for the map is 5 columns. The program prompts the user to provide the size of the map.</p></li>
  <li><p>When entering the size of the map, the program ensures that a valid number has been input. If not the user is presented with a message to input a valid number. The user cannot continue until an acceptable number is input.</p></li>
  <li><p>If the user types in valid coordinates, the program stores that information. Design a creative approach to presenting the user that the coordinates have been recorded.</p></li>
  <li><p>If the user types in coordinates that don’t exist, creatively present the user a message of this. These coordinates must not be stored. Only valid coordinates are stored.</p></li>
  </ul>