Strings & Console Output


#1



https://www.codecademy.com/courses/python-beginner-sRXwR/1/5?curriculum_id=4f89dab3d788890003000096

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


#2

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"


#3

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.


#4

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


#5

Wow. Refreshing the page just worked. Thanks.


#6

Hooray! No problem :slight_smile:


#7

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


#8

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

random_string = "foo"
print random_string

output:
>> foo

#9

you can try this.I think it works.

len(ministry)
ministry.upper()
print len(ministry)
print ministry.upper()


#10

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