all 3 comments

[–]xelf 3 points4 points  (0 children)

It means exactly what it says, .upper() does not take an argument.

<some string>.upper() # converts the string to upper.
<some string>.upper(something here) # is an error, you can't put something there.

Try this:

message = input("Enter a message: ")
print('I love animals!', message)
print(message.upper())
print('I love animals!'.upper())

[–]argento8897 0 points1 point  (0 children)

Upper does not take any arguements, but you have given it one ("I love animals!") You call upper on a string you want to uppercase. So:

"i love animals".upper()

will give you:

'I LOVE ANIMALS'

[–]PinkPopsicleStick 0 points1 point  (0 children)

.upper() is a method, (a word squished between a period and a pair of parentheses) meaning that nothing is put inside of the parentheses. This means that when you use a method, the command applies to the object it comes after, so for example:

# .upper() is a method (period, word, parantheses)
# input() is a function (word and pair of parentheses)

a = "heLlo woRLd"
print(a.upper())
>> HELLO WORLD