Strings & Console Output


I'm getting error message when i put the above code in. Don't know what else to put.

Error message - File "python", line 3, in
TypeError: 'str' object is not callable

get it right

Replace this line with your code. 
3.print len(ministry)
4.print ministry.upper()


Is that your full code? Seems like the variable definition of ministry is missing.

At the beginning of this lesson, you were given
ministry = "The Ministry of Silly Walks"


ministry = "The Ministry of Silly Walks"

print len(ministry)
print ministry.upper()

That's the full code i'm entering and it's not accepting it.


Looks fine to me. Try refreshing the page or change browsers.


Wow. Refreshing the page just worked. Thanks.


Hooray! No problem :slight_smile:


caesar "Graham"
praline "John"
viking "Teresa"

I put this code in for strings and console output but it keeps saying error did you put the variable caesar even though I did help


You're not assigning variables correctly. You need the = sign to assign things.
Like this:

random_string = "foo"
print random_string

>> foo


you can try this.I think it works.

print len(ministry)
print ministry.upper()


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.