Please i need help on 8/19 ...and seek!


Replace this line with your code.


i messed up my first topic i made. here is my code

from random import randint

random_number = randint(1, 10)

guesses_left = 3

while guesses_left > 0:
guess = int(raw_input("Your guess: "))
guesses_left -= 1
if guess == random_number:
print "You win!"
print "You lose."


what error message are you getting?


Oops, try again. Did you declare a variable called guess_row?


Hi can you take a screenshot of your code?


Are you on lesson @caeleb

Your own while / else


i don't know how to take a screenshot of my code


the lesson name is ...and seek!


SO it's that one ?
Battleship! - ...and Seek!
If so your code shouldn't be like the one you posted


then how should it be?


part of it should be like that

from random import randint

board = []

for x in range(0,5):
    board.append(["O"] * 5)

def print_board(board):
    for row in board:
        print " ".join(row)

def random_row(board):
    return randint(0, len(board) - 1)

def random_col(board):
    return randint(0, len(board[0]) - 1)


oh okay thanks for the help


hi i am no where near battal ship


def plane_ride_cost(city):
if city == "Charlotte":
return 183
elif city == "Tampa":
return 220
elif city == "Pittsburgh":
return 222
elif city == "Los Angeles":
return 475


do that it should work alexanderweaver