2/7 planning a trip...i give up


#1

ive been doing this for the last 30 mins, i fell like its an obvious answer but this is what ive done

def hotel_cost(nights):
nights = raw_input("Enter number of nights!")
return 140 ** nights

if you know the answer and/or can explain my mistake i would appreciate it

File "python", line 2
nights = raw_input("Enter number of nights!")
^
IndentationError: expected an indented block

^^ thats what came up btw


#2

It does not want you to have the raw_input in your code.

Also your indentation is off given your error code.

def hotel_cost(nights):
    return 140*nights # Put 4 spaces for each indentation block

#3

I see where you're coming from but it's quite simple really.

def hotel_cost(nights):
return 140*nights

print hotel_cost(1)

This is what I did and it worked :smiley:


#4

here you go!
def hotel_cost(nights):
return 140 * nights


#5

i did the same thing but it bloody dsnt work for me