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")

26th Dec 2016, 11:10 PM
Kishore
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 ;)
27th Dec 2016, 6:44 AM
visph
visph - avatar
+ 1
Indentation error bro!!! def min(code): print (code+"i") %you missed indentation here....
27th Dec 2016, 1:30 PM
Shubham Menkudle
Shubham Menkudle - avatar
- 1
maybe you have an IndentationError in your "min" definition: you need an indentation after a function definition
26th Dec 2016, 11:20 PM
Amaras A
Amaras A - avatar
- 1
nop .. same error friend...
26th Dec 2016, 11:21 PM
Kishore
- 1
Can you give us the error that is thrown, please ?
26th Dec 2016, 11:42 PM
Amaras A
Amaras A - avatar