What is wrong with my code?


#1

It says my code is wrong this is what i wrote:

ministry = "The Ministry of Silly Walks"
len(ministry)
ministry.upper()
print
print

It says "Oops, try again. It looks like you printed " " instead of "27"."


#2

Judging from the error message, you need to print the length...

print len(ministry)

#3

ok thank you!!! that really helped and now i understand it better!


#4

You're welcome. In future, please include a lesson number with your post, or a link to the exercise so we can locate the exercise. Thank you.


#6

I came across the same problem, there isn't a HINT. Your comment worked for me, but....the number 27....what does it mean? How do you get 27 form the data?


#7

In addition, we're ask to: invoke the ministry's .upper() function....I don't see how this is needed in the exercise. Why not just use: print len(ministry) - print the length of the string defined in the variable ministry.


#8

Hi
I printed length
print len(ministry),
but in instruction I should also use .upper() string...

Could you help me?

Thx


#9

Check instructions. It says that you should use .upper() function on ministry variable, but you didn't.


#10


I did itpreviously, but I've got:
"Oops, try again. It looks like you printed "THE MINISTRY OF SILLY WALKS" instead of "27"."


#11

You aren't asked to print ministry.upper(), but only invoke upper() method. Then print len(ministry).


#12

You have to print len for example print len(ministry)


#13

I already wrote it. Read my post, please.


#14

I did it and had the same result.
See my first post


#15

No, you didn't. You had only called print len(ministry), but you didn't call upper() before it.


#16

2 posts were split to a new topic: Stuck on the 4th line code


#17