Strings and console output


#1

On line 3, call the len() function with the argument ministry.
On line 4, invoke the ministry's .upper() function.

how do i do dis??????


#2

I am just going to give you an example

Assuming a have a variable called snakes and it stores a values of type string

snake = "Python"

Now if if i want to find out how many letters are in the word "Python" then i have to use the function len() like this

num_of_letters = len(snake) #i pass snake as the argument
                            #because we store 'Python' in it so whenever we
                            #call snake it is actually that string

#you can now print it like this
print num_of_letters #which will be 6

#here we had to first the length of the string in a variable before printing it
#but we can print that call to console without the variable like this

print len(snake)

Using the same example i used earlier if you have string and you want to turn it into all Caps the the upper() function is used

word_in_caps = snake.upper() #this will convert whatever is stored in snake
                             #to uppercase and store it in 'word_in_caps'


# no we can print it like this
print word_in_caps # which will print 'PYTHON'



#here we had to first the uppercase of the string in a variable before printing it
#but we can print that call to console without the variable like this

print snake.upper()

It has got me stuck can anyone help
Stuck here,Need Help
#3

ministry = "The Ministry of Silly Walks"

print len.ministry()
print