Capitalize Washington


#1
president = "washington"
truth = "Liver is excellent."
print(president.capitalize)
print(truth.replace("excellent", "horrible"))

The error I get is: <built-in method capitalize of str object at 0x7f3ea0401900>
Liver is horrible.
None

This is practially the way codeacademy tells me to code this. Any idea what to write here?


#2

calling a method, .capitalize() requires parentheses


#3

Yep. And while adding the parentheses in the code created the right result
in the console… Codeacademy isn’t accepting the answer. :disappointed_relieved:


#4

Please share the exercise url, updated code and error message


#5
president = "washington"
truth = "Liver is excellent."

print(president.capitalize())
print(truth.replace("excellent", "horrible"))|

Result:
Washington
Liver is horrible.
None

Error message:

Oops, try again. The president should have his initial letter in upper case.


#6

you didn’t include the exercise url, now i have still no idea what exercise you are at.

maybe refresh the page? Don’t know, i really need the exercise url


#7

https://www.codecademy.com/en/courses/python-intermediate-en-HJJev/0/1#


#8

Please update to the supported version of the python track:

https://www.codecademy.com/learn/learn-python

the president variable should contain correct result, so you need to update the president variable by storing the returned result of capitalize