0
Is there any wrong with the code? I'm getting errors please let me know ... thanks
def print_with_exclamation(word): print(word + "!") print_with_exclamation("spam") print_with_exclamation("eggs") print_with_exclamation("python") def min(code): print (code+"i") min ("apple")
5 odpowiedzi
+ 3
@Kishore:
The script work if you make the change @Amaras A suggest to you ^^
Like this ( comment on changed line ):
def print_with_exclamation(word):
print(word + "!")
print_with_exclamation("spam")
print_with_exclamation("eggs")
print_with_exclamation("python")
def min(code):
print (code+"i") # without indentation, Python don't know were your function start and end
min ("apple")
Before that, script raise an "IndentationError: expected an indented block", with the line number at were it's happened ;)
+ 1
Indentation error bro!!!
def min(code):
print (code+"i") %you missed indentation here....
- 1
maybe you have an IndentationError in your "min" definition: you need an indentation after a function definition
- 1
nop .. same error friend...
- 1
Can you give us the error that is thrown, please ?